October 22, 2012 at 10:20 am
ORDER BY CASE CARAC WHEN 'None' THEN 1 WHEN 'Low' THEN 2 WHEN 'Strong' THEN 3 WHEN 'Extreme' THEN 4 END ASC, PROJ ASC
October 22, 2012 at 10:21 am
Dave Ballantyne (10/22/2012)
Why not normalize the CARAC values to a different table , add a 'SortOrder' Column and Bobs you uncle ?
Yes, or this 🙂
October 22, 2012 at 10:24 am
Gazareth (10/22/2012)
Dave Ballantyne (10/22/2012)
Why not normalize the CARAC values to a different table , add a 'SortOrder' Column and Bobs you uncle ?Yes, or this 🙂
Didnt want to "Do a Celko" 🙂 , but lets do things right eh 🙂
October 22, 2012 at 10:27 am
Thanks Body's
Works fine now.
Regards
Thanks!
October 22, 2012 at 10:31 am
Dave Ballantyne (10/22/2012)
Gazareth (10/22/2012)
Dave Ballantyne (10/22/2012)
Why not normalize the CARAC values to a different table , add a 'SortOrder' Column and Bobs you uncle ?Yes, or this 🙂
Didnt want to "Do a Celko" 🙂 , but lets do things right eh 🙂
A table's typically the way I'd want to do it anyway. If that order by clause had to appear in more than one query or had any more criteria, it'd be straight in a table! 🙂
October 22, 2012 at 10:32 am
davdam8 (10/22/2012)
Thanks Body'sWorks fine now.
Regards
Thanks!
No problem, glad it got sorted. If that ordering does have to appear in other queries, look at putting it in a table as Dave suggested.
You'll find it much easier to maintain 🙂
Cheers
Gaz
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply