解决方案: |
select * into qian1 from ia_ensubsidiary where inid not in (select inid from ufdata_111_2006..ia_ensubsidiary where imonth=0) and brdflag=1 and cvoutype=06 and iainquantity<>isoutquantity (过滤在上年未结转到下年的分期收款发货业务的发货明细记录)将此记录导入到临时表中执行如下语句: update qian1 set imonth=0 update qian1 set iaoutquantity=iainquantity update qian1 set iainquantity=iainquantity-isoutquantity update qian1 set isoutquantity=null update qian1 set iainprice=iainquantity*iincost update qian1 set iaoutprice=iaoutquantity*ioutcost update qian1 set isoutmoney=null update qian1 set bmoneyflag=1(语句分先后顺序,QIAN1为临时表名称) 后将此表记录导入到ensubsidiary表中 |