DELETE A FROM (
SELECT ROW_NUMBER()OVER(PARTITION BY CenterRefID,CorporateRefID,CenterID,obsolute ORDER BY CenterRefID,CorporateRefID,CenterID DESC) RANK1,CenterRefID,CorporateRefID,CenterID,obsolute
FROM TblCorpRefIDMapping ) A
WHERE RANK1 > 1
No comments:
Post a Comment