Mark Shvarts 1
SSCertifiable
Points: 5702
More actions
May 8, 2008 at 8:12 am
#190400
I need to conditionally Order by some_column_name, but if that's column record is equal to some particular value, place it first.
Thanks
Mark Cowne
One Orange Chip
Points: 26952
May 8, 2008 at 8:14 am
#812433
Try this
order by case when some_column_name='some particular value' then 0 else 1 end, some_column_name
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
May 8, 2008 at 8:30 am
#812439
Thanks. That's what I wanted.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply