update gLsPieceItem
set zlsgamount = cropamount * cast (djbl as decimal(12,2))-fpamount
where woid ='00000000000000013846' and processid ='000019'
and bh in( 45,46)
这一段SQL可以正常执行
update gLsPieceItem
set zlsgamount = cropamount * cast (djbl as decimal(12,2))-fpamount
where woid ='00000000000000013846' and processid ='000019'
and bh in (select bh from gZlSgDj where billid = 'SG57915100')
这段为什么就报错--从数据类型varchar转换为numeric出错
select bh from gZlSgDj where billid = 'SG57915100'
这句查出来就是等于第一段的那个bh in( 45,46)
BH类型为varchar(20)