Numeric Order By In Transact SQL (Ordering As String Instead Of Int)
- by Pyronaut
I have an issue where I am trying to order a result set by what I believe to be a numberic column in my database. However when I get the result set, It has sorted the column as if it was a string (So alphabetically), instead of sorting it as an int.
As an example. I have these numbers,
1 , 2, 3, 4, 5, 10, 11
When I order by in Transact SQL, I…