我试图按我的数据库中的数字列进行排序,其数值为0-1000并包含十进制数字。按订单编号的SQL
当我使用
ORDER BY len([FY14 Points]), [FY14 Points]
我得到...
0
48
150
249
36.9
39.7
44.5
52.5
54.4
57.9
58.4
60.1
我也试过......
ORDER BY registration_no * 1 ASC
但得到这个...
Msg 245,Level 16,State 1,Line 6
将varchar值'88.4'转换为数据类型int时转换失败。
有没有人知道我能做些什么来解决这个问题?
为什么要使用ORDER BY len([FY14 Points]),[FY14 Points]?这是排序长度(字符数)的值 - 我假设你想这些值按数字排序? – Nathan