sql server 数据类型转换出错

字段percentcomplete 是 varchar 类型, 都是存的数字

用 where cast(percentcomplete as numeric(12,2))<>100 报从数据类型varchar转换为numeric 时出错

这个sql有多个子查询,当单独执行各个子查询的时候,不会抱错,但整体执行就抱错

将每个子查询都按照case when isnumeric(percentcompleter)=1 then cast (percentcomplete as numeric(12,2)) else 0 end!=100写,就不抱错了 

相关文章:

  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-02-02
  • 2022-02-28
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-04-17
  • 2022-12-23
相关资源
相似解决方案