The "Featured Script" a couple days ago was a simple way to delete duplicates. A common task if only because end-users will rarely check if some value already exists before entering it again. Wanted to offer a more complicated solution, comes in handy when you need to do more than just delete -- combine child records, keep a record of deletes, make a change to the record you're keeping, etc.
This solution uses embedded cursors, so is definitely a performance monster. On very large tables, with a large number of duplicates, you should run it during off-times.
[ListOfFields] below would be all the fields that have to match to be considered a duplicate.
ย
Aside - my first posting on SQLServerCentral. I'm a long-time reader and big fan, dipping my foot in on posting. Maybe I'll move up to articles next time... ๐ This is kinda fun.