Delete one of duplicated records | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Delete one of duplicated records

I can locate the duplicated records in a table. I have written a script using CURSOR and WHILE loop to travers the table and insert rows to other table and prevent to insert dupliacted records. It is very slow. Is there any faster or easier way to delete duplicated records? Note that I need to have only one of the duplicated records in my table. Thanks, CanadaDBA
I should write the title as "Keep one of duplicated records" CanadaDBA
There already is one. Look at the articles at www.sqlteam.com . They have one that deals specifically with deleting them. And there’s definitely a faster way. MeanOldDBA
[email protected]otmail.com When life gives you a lemon, fire the DBA.
http://www.sql-server-performance.com/rd_delete_duplicates.asp
http://www.sqlteam.com/item.asp?ItemID=3331 (Derrick’s mentioned)
http://www.winnetmag.com/SQLServer/Article/ArticleID/21704/21704.html Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thank you gentelmen, Your replies are complete. CanadaDBA
]]>