运行此查询时出现此错误...
select *, stuff(PartNumber,1,3,'')
from products.products
where isnumeric(stuff(partNumber,1,3,'')
order by cast(Stuff(partNumber,1,3,'')As Float)
有什么想法吗?
谢谢!
答案 0 :(得分:4)
where
声明不完整:
where isnumeric(stuff(partNumber,1,3,'')) = 1
-----------------------------------------^
答案 1 :(得分:1)
看起来你错过了一个括号:
此:
where isnumeric(stuff(partNumber,1,3,'')
应该是:
where isnumeric(stuff(partNumber,1,3,''))
答案 2 :(得分:1)
首先是缺少闭括号“)”,另一个是当输入表达式求值为有效数值数据类型时,必须在where子句中指定isnumeric返回1。
` select *, stuff(PartNumber,1,3,'')
from products.products
where isnumeric(stuff(partNumber,1,3,'')) =1
order by cast(Stuff(partNumber,1,3,'') As Float)
`