解决方案: |
请在修改前先做好数据备份。 在数据库中执行如下的脚本: use ufdata_500_2006 update rdrecord set cvouchtype='32',biafirst=0,caccounter='demo' where ddate<'2006-01-01' and cbustype='委托代销' update rdrecords set iquantity=iq from rdrecord a inner join rdrecords b on a.id=b.id inner join (select sum(ibeginquantity) as iq,cwhcode,cinvcode from st_totalaccount where imonth=1 group by cwhcode,cinvcode ) c on a.cwhcode=c.cwhcode and b.cinvcode=c.cinvcode where cmemo='850补丁调整工具调整数据' and iquantity<>iq update rdrecord set bisstqc=0 from rdrecord a join rdrecords b on a.id=b.id where cvouchtype='32'and iquantity |