SELECT ColumnA, ColumnB FROM YourTable ORDER BY CASE WHEN ColumnB IS NULL THEN 1 ELSE 0 END ASC, ColumnB
http://stackoverflow.com/questions/5492589/sql-select-ordering-columns-with-null-values
No comments:
Post a Comment