Hi. I have a varchar column in SQL 2000. It contains numeric and alphanumeric characters: 1, 2, 2A, 3, 3A, 4, 5, 6, 7, 8, 9, 10, 10A, 11, 12, 12A, etc
ORDER BY MyColumn puts the items in order of 1, 10, etc.
I'd like to be in order by:
1
2
2A
3
3A
4
5
6
7
8
9
10
10A
11
11A
I tried padding with leading zeros, but the A throws it off. I end up with:
0001
0002
002A
0003
003A
Which also is not the right order.
Anyone have an idea how I can make this sort order work?
Thanks!
ORDER BY MyColumn puts the items in order of 1, 10, etc.
I'd like to be in order by:
1
2
2A
3
3A
4
5
6
7
8
9
10
10A
11
11A
I tried padding with leading zeros, but the A throws it off. I end up with:
0001
0002
002A
0003
003A
Which also is not the right order.
Anyone have an idea how I can make this sort order work?
Thanks!