Execscript sql 问题
在sql中运行:SELECT cast(thick AS char(10)) as 厚度 FROM tb_中板仓库_b WHERE (jlsjh_tb_生产跟踪表 IN (SELECT jlsjh FROM Tb_细木板跟踪表 WHERE (RTRIM(LTRIM(单据编号)) ='xmgzb'+CAST(YEAR(GETDATE()) AS varchar(4))+RIGHT('0'+CAST(MONTH(GETDATE()) AS varchar(2)),2)))),可以运行,没有错!用Execscript()没有问题
SELECT cast(thick*venthick*2-1 AS char(10)) as 厚度 FROM tb_中板仓库_b WHERE (jlsjh_tb_生产跟踪表 IN (SELECT jlsjh FROM Tb_细木板跟踪表 WHERE (RTRIM(LTRIM(单据编号)) ='xmgzb'+CAST(YEAR(GETDATE()) AS varchar(4))+RIGHT('0'+CAST(MONTH(GETDATE()) AS varchar(2)),2)))),也可以运行,也没有错!
但在:Execscript()出错了?大侠们知道怎么回事?