Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI have a results set that is sorted on LineNum. Not all items have a LineNum (some are null). I want my result set to return all items in ASC LineNum order and then list all items with NULL LineNum at the end of the results. Any Suggestions? Thanks.
Post Follow-up to this messageOn 25 Jan 2006 12:22:36 -0800, ActiveX wrote: >I have a results set that is sorted on LineNum. Not all items have a >LineNum (some are null). I want my result set to return all items in >ASC LineNum order and then list all items with NULL LineNum at the end >of the results. Any Suggestions? Hi ActiveX, ORDER BY CASE WHEN LineNum IS NULL THEN 1 ELSE 0 END, LineNum -- Hugo Kornelis, SQL Server MVP
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread