SQL报错,从数据类型varchar转换为numeric出错

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)


1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问