标签:
--去重
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)
标签:
原文地址:http://www.cnblogs.com/hupolinglong/p/5644302.html