Question : Custom Order By

This works in Access, but not in SQL - how can I achieve the same results in SQL Server?

SELECT Address.City, Address.State
FROM Address
ORDER BY State='MN', State='WI', Address.State

Thanks for the help.

Answer : Custom Order By

Try this:

SELECT Address.City, Address.State
FROM Address
ORDER BY
 case Address.State when 'MN' then "01" when 'WI' then "02" else Address.State end

Good Luck,
Steve
Random Solutions  
 
programming4us programming4us