【正文】
查找差異的紀(jì)錄: select aa.* from ( select * from fa_total where iperiod=1 ) aa left join ( select * from fa_total where iperiod=2 ) bb on = and = where is null www . ufsoft . com 分析過(guò)程 明細(xì)記錄: www . ufsoft . com 分析過(guò)程 問(wèn)題原因找到了:?jiǎn)栴}是如何修改,很明顯,數(shù)據(jù)表中丟失了或缺少了一些記錄: 每個(gè)月都有此情況,且記錄數(shù)不一樣,如何才能改對(duì)? www . ufsoft . com 分析過(guò)程 以二月份為例: select aa.* into depr2 from ( select * from fa_total where iperiod=1 ) aa left join ( select * from fa_total where iperiod=2 ) bb on = and = where is null www . ufsoft . com 分析過(guò)程 update depr2 set iperiod=2 ,lmonthcount=0,dbllastaccrualvalue=0,dbllastdepr=0,dbllastaddvalue=0,dbllastdecvalue=0, dblmon