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
IE8 desktop short cuts won't open maxed.
aspx/c# looping through data from within body
Report runtime user input to be included
Access 2007 lost focus event
ERROR IN HEADER - DISPLAYS IN PREVIEW BUT DOES NOT PRINT
How to combine two sp
Script Needed in Great Plains Integration Manager
Ideas on making this Query less CPU intensive?
Math Operations in Sql Queries
Calculate Total for the same transaction