当前位置: 代码迷 >> 综合 >> Conversion failed when converting the varchar value ‘No‘ to data type bit. (245)
  详细解决方案

Conversion failed when converting the varchar value ‘No‘ to data type bit. (245)

热度:15   发布时间:2023-09-19 21:03:25.0

[22018] [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting the varchar value 'No' to data type bit. (245)

sqlserver的sql语句中union all两段sql语句后,一段是字符串类型'no',一段是数字型0或1因此报错,在union all两段sql语句都加上case when c.IS_NULLABLE=0 then 'No' else 'Yes' end as IS_NULLABLE后不报错了。

  相关解决方案