Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to sort part of list in sql?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-06 : 20:07:16
George writes "Hi,

I'd like to sort a list in alphabetical order but one of items e.g. 'other (none of the above)' need to stay in the bottom. How can I do this in a SQL statement (MS SQL 2000)?

Thanks,
George"

nosepicker
Constraint Violating Yak Guru

366 Posts

Posted - 2006-04-06 : 21:09:38
SELECT ...
FROM ...
WHERE ...
ORDER BY
CASE WHEN YourColumn = 'other (none of the above)' THEN 'zzzzzzzz' ELSE YourColumn END
Go to Top of Page
   

- Advertisement -