原因是本期有重复表造成的,需要删除结转的历史数据, 操作步骤:
SELECT * FROM T_HS_OUTACCTG WHERE FID = 100202
SELECT DISTINCT FID FROM T_HS_INIVBALANCE_H WHERE FID = 100202
SELECT DISTINCT FID FROM T_HS_INIVBALANCE WHERE FID = 100202
开始删除错误的历史数据
SELECT *
--INTO T_HS_INIVBALANCE_BAK201027
--DELETE
FROM T_HS_INIVBALANCE_H
WHERE FID = 100202
最终正确结账: