I have a column with an alphanumeric value called TableName which could be almost any phrase as long as it is alphanumeric.
Sample data could be (Not necessarily 3 alphabet followed by a number)
AAA 1
AAB 2
AAC 3
AAB 10
AAC 12
AAB 12
If i use a normal sort like ORDER BY TableName
This will become
AAA 1
AAB 10
AAB 12
AAB 2
AAC 12
AAC 3
What I'm trying to accomplish is
AAA 1
AAB 2
AAB 10
AAB 12
AAC 3
AAC 12
I'd like you to know that this field COULD be ANYTHING i.e.
ABC123MAS3482
KASJ19LKA
213LKS23
Just to let you know that there is no format in the field. The only rule is that it is alpha numeric.
I hope you guys could help me with your advance knowledge in SQL.
I'm using SQL Server 2008 R2