日期:2014-05-17 浏览次数:20596 次
update SpKuCun set kcdj=(Select Sum((isnull(jh_qty,0)-Isnull(xs_qty,0))*Sp_jhdj)
From spjinhuo
Where jh_qty>xs_qty and sp_tm='300002')/kcsl
where kctm='300002'
------解决方案--------------------
update SpKuCun
set kcdj=(Select Sum((isnull(jh_qty,0)-Isnull(xs_qty,0))*Sp_jhdj)
From spjinhuo
Where jh_qty>xs_qty and sp_tm='300002')/kcsl --直接把@cje替换掉
where kctm='300002'