RE: Delete
Got this from someone on this site. I cannot take credit for it. I cannot remember who it was... ALTER TABLE TableWithDuplicates ADD EliminateDuplicates_RowID int NOT NULL IDENTITY(1, 1) DELETE FROM t1 FROM TableWithDuplicates t1 JOIN( SELECT EliminateDuplicates_RowID=MAX(EliminateDuplicates_RowID), Field1, Field2, Field3, Field4 FROM TableWithDuplicates GROUP BY Field1, Field2, Field3, Field4 HAVING COUNT(*) >= 2 ) […]
2003-06-11