These are the result of a query I ran:
10
10.5
11
11.5
12
12.5
13
5
5.5
6
6.5
7
7.5
8
9.5
8.5
9
Column's datatype is nvarchar
.
How can I order by the results?
I tried Order by asc
and desc
but did nothing.
Use CAST
to treat the values as numbers:
ORDER BY CAST(columnName AS FLOAT)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With