SQL sort values alphabetically then Numercially

I have a table in a form that I want to show the values in ascending alphabetical order and then nemerical. currently if you sort alphbetically it places the numeric values first. how can I get it to put the alphbetic valuse first? Using MS SQL 2005
Bill WarrenIT ManagerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
chapmandewConnect With a Mentor Commented:
select * from tablename
order by case when isnumeric(fieldname) = 1 then 2 else 1 end asc, fieldname asc
0
 
EricKaplanCommented:
It's quite dependent on the values you wish to sort, you could use the mentioned query or use padding to make the number value evaluate as alphanumeric.

You could use a function to calculate and return a "sortable" value.
0
All Courses

From novice to tech pro — start learning today.