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)
 Ordering in a specific order

Author  Topic 

raisor
Starting Member

28 Posts

Posted - 2004-04-27 : 06:57:28
Hi there,

I have a column with the following information

a
e
f
f
t
t
a
y


I need it sorted so the *f's* are on the bottom and the rest is sorted asc

resulting in:
a
a
e
t
t
y
f
f

Could anyone tell me how?

Thanks!

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-04-27 : 07:21:26
search here for CASE + ORDER BY....you'll see a few examples of solutions to this problem.
Go to Top of Page

raisor
Starting Member

28 Posts

Posted - 2004-04-27 : 07:59:08
Thanks for pointing me into a direction!

Found something that I could use:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=34407&SearchTerms=CASE,ORDER

quote:
Originally posted by AndrewMurphy

search here for CASE + ORDER BY....you'll see a few examples of solutions to this problem.

Go to Top of Page
   

- Advertisement -