--去重
DELETE FROM DEPR_MONTHS_LIST AWHERE (A.ASSET_ID,A.DEPR_DATE,A.UNIT_COST_ID) IN(SELECT B.ASSET_ID,B.DEPR_DATE,B.UNIT_COST_ID FROM DEPR_MONTHS_LIST B
GROUP BY B.ASSET_ID,B.DEPR_DATE,B.UNIT_COST_ID HAVING COUNT(1)>1)
AND ROWID NOT IN(SELECT MIN(ROWID) FROM DEPR_MONTHS_LIST C GROUP BY C.ASSET_ID,C.DEPR_DATE,C.UNIT_COST_ID HAVING COUNT(1)>1)
时间: 2024-10-10 20:51:41