太明显了,都告诉你了:d附件有语法错误;在你的存储过程中你用/* */来把你不想执行的部分注释掉看看CREATE PROCEDUREver_xiaoshouchuku
--
@anvarchar(200),
@a1nvarchar(200)
--
@b int
AS---declare@c nvarchar(50),----仓库--
@d int-----------出入标志begin tran--set @c=(select cwhcode from rdrecord where id=@b);--set @d=(select brdflag from rdrecord where id=@b);--exec(@a);exec(@a1);/*update currentstock setcurrentstock.iquantity=isnull(currentstock.iquantity,0)-rdrecords.iquantity,preout=preout-rdrecords.iquantityfrom rdrecords where rdrecords.id=@b andcwhcode=@c and rdrecords.cinvcode=currentstock.cinvcode and @d=1update currentstock setcurrentstock.iquantity=isnull(currentstock.iquantity,0)+rdrecords.iquantity,prein=prein-rdrecords.iquantityfrom rdrecords where rdrecords.id=@b andcwhcode=@c and rdrecords.cinvcode=currentstock.cinvcode and @d=0*/IF @@error
0
ROLLBACK TRANSACTION
ELSE commit tranGO
|