riyaziq (11/26/2014)
Thanks Koen for the suggestion.The query I had in mind was incomplete. It should be like this:
ALTER TABLE [Table Name] ADD AUTOID INT IDENTITY(1,1)
DELETE FROM [Table Name] WHERE AUTOID NOT IN (SELECT min(autoid) FROM [Table Name]
GROUP BY [Field1],[Field2]
That one does make more sense 🙂
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP