【正文】
eriod=1 select sum(dblyearvalue),sum(dblyeardeprtotal) from fa_total where iperiod=2 www . ufsoft . com 分析過程 分析是否存在不相等的數據: select * from ( select * from fa_total where iperiod=1 ) aa inner join ( select * from fa_total where iperiod=2 ) bb on = and = where www . ufsoft . com 分析過程 查詢結果是沒有: www . ufsoft . com 分析過程 再分析數據差異在哪里: select sum(),sum() from ( select * from fa_total where iperiod=1 order by sdeptnum,stypenum ) aa left join ( select * from fa_total where iperiod=2 order by sdeptnum,stypenum ) bb on = and = where is null www . ufsoft . com 分析過程 可以看到數據差異為: = www . ufsoft . com 分析過程