Names+-+Delete+Duplicate+Alternate+Names+of+Type+'Married'

A member of the RootsMagic-Users Facebook Group posted this question:

 =====  [|Ted Duffy]   ===== [|February 3 at 11:04am]  I just imported my Legacy Family Tree database into RM7. Many of my female ancestors now have exact duplicate Alt Name Facts in RM7. Is there a way to bulk delete these duplicates?

Of course, the answer is not in the tool-set RootsMagic 7 provides. But SQLite can come to the rescue. Here's a pretty short script that should do the job. Be warned that it looks for exactly duplicated name fields (all name fields), not just similar ones. And it only operates on 'Married' Alternate Names.  Be sure to test on a copy of your database or make a backup just prior to running the script.