I have a table with this data in SQL Server :
Id
=====
1
12e
5
and I want to order this data like this:
id
====
1
5
12e
My id column is of type nvarchar(50) and I can’t convert it to int.
Is this possible that I sort the data in this way?
I’d actually use something along the lines of this function, though be warned that it’s not going to be super-speedy. I’ve modified that function to return only the numbers:
Once you create that function, then you can do your sort like this: