Français



SELECT ID, ROW_NUMBER() OVER(PARTITION by cd.ClientID, cd.StartDate ORDER BY ID) as RowNumber
INTO #toDelete
FROM ClientDefaults cd

DELETE ClientDefaults
WHERE ID IN (SELECT ID FROM #toDelete WHERE RowNumber > 1)

DROP TABLE #toDelete

BurnBoolean inc. 2018