Wednesday, June 27, 2012

In sql server how do you order a table when the column has this data


In sql server how do you order a table when the column has this data

1
11C
3
3
4
5
5A
and i want it to look like this
1
3
3
4
5
5A
11C

select * from mytable  order by LEN(Datacolumn),datacolumn asc;

No comments:

Post a Comment