Microsoft
Software
Hardware
Network
Question : Setting the "Order by" Order
Hello all,
I have a MS SQL query where I am ordering by a string field called 'length'
Order by length acs
1 Year
2 Years
3 Years
5 Years
6 Month
7 Years
I will need to have the order by displaying '6 Month' first.
6 Month
1 Year
2 Years
3 Years
5 Years
7 Years
How can I accomplish this?
Answer : Setting the "Order by" Order
order by case when [length] like '% month%' then 0 else 1 end asc, [length] asc
Random Solutions
Graduated Commission Scale
restoring a .bak file SQL SERVER 2005
Target S Curve
How do I limit concurrent IE sessions for a Citrix user on Windows 2003 server?
Access Query Design Where/Or Criteria Trouble (SQL Where)
ALTER TABLE / ALTER COLUMN QUESTION???
Linked table question
Migrating app from VB.net 2005 to VB.net 2008 SqlCeEngine compatibility issue needs fixed
How do I sum a range of data containing Excel errors?
Search function in Excel also in Access?