解决方案: |
1、如果仍想对上,可以用下面的语句根据存货明细帐更改一下单据上的计划金额 update a set ipprice=iaoutprice from ia_subsidiary b inner join rdrecords a on b.id=a.autoid where dvoudate>='2005-5-1' and cvoutype='11' and isnull(iaoutprice,0)<>isnull(ipprice,0) 问题2:可以使用下面语句进行更改: update b set facost=ipunitcost from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and facost is null and caccounter is not null update a set isvacost=facost,isvaprice=convert(decimal(20,2),isvquantity*facost) from pursettlevouchs a inner join rdrecords b on a.irdsid=b.autoid where isnull(facost,0)<>isnull(isvacost,0) and facost is not null and isvquantity<>0 update b set facost=isnull(iaprice/iquantity,0) from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and caccounter is not null and isnull(iaprice/iquantity,0)-isnull(facost,0)>0.01 and facost is not null |