解决方案: |
可以使用附件中的更改语句在查询分析器中针对数据帐套执行,以进行更改 --更改 update b set iaprice=convert(decimal(20,2),isnull(iaprice,0)) from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and isnull(iaprice,0)<>0 update b set iunitcost=convert(decimal(20,2),isnull(iprice,0))/iquantity from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and iaprice is not null and caccounter is not null and iunitcost is null and isnull(iprice,0)<>0 and isnull(iquantity,0)<>0 update b set facost=iunitcost from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and iaprice is not null and caccounter is not null and facost is null and isnull(iprice,0)=isnull(iaprice,0) update b set facost=convert(decimal(20,2),isnull(iaprice,0))/iquantity from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and iaprice is not null and caccounter is not null and facost is null and isnull(iprice,0)<>isnull(iaprice,0) and isnull(iquantity,0)<>0 update a set isvacost=b.facost from pursettlevouchs a left join rdrecords b on b.autoid=a.irdsid update a set isvaprice=convert(decimal(20,2),isvquantity*isvacost) from pursettlevouchs a left join rdrecords b on b.autoid=a.irdsid where isnull(a.isvquantity,0)<>isnull(b.isquantity,0) update a set isvaprice=convert(decimal(20,2),b.imoney) from pursettlevouchs a left join rdrecords b on b.autoid=a.irdsid where isnull(a.isvquantity,0)=isnull(b.isquantity,0) |