Forum

Please or Register to create posts and topics.

SQL to display all instances of duplicated citations

My RM database was created by importing a TMG (The Master Genealogist) project into RM7 several years ago. One obvious problem was that I now had many duplicated citations. The cause was clear- citations that documented Father-Child and Mother-Child relationships in TMG were combined and attached to the newly created ChildParent fact in RM. That's were most of my duplicates reside. These persisted after upgrade to RM8 and use of it's "combine identical citations" command.

I wrote a SQL command to display all instance of duplicated (or triplicated etc.) citations linked to the same object- Person, Fact etc..
https://github.com/ricko2001/Genealogy-scripts/blob/main/RM%20-Misc%20SQL/Duplicate%20citations%20in%20a%20list%20-find.txt

I wrote a couple of others to delete the extraneous citations.
The simple SQL eliminates them all in one operation, but I didn't want to do that.
Instead, I wrote a second SQL to delete the extra citations that are attached to the Fact ChildPerson. The SQL actually prompts for the fact type.
https://github.com/ricko2001/Genealogy-scripts/blob/main/RM%20-Misc%20SQL/Duplicate%20citations%20in%20a%20list%20-delete.txt

Don't know if they will be of interest. I imagine it would be worthwhile to run the reporting SQL so see the state of your citations. These will not work on pre RMv8, but only tested on RM9.

Richard Otter

PS- to download the SQL, click the link, then hit the download button with the downward facing arrow, or the "Raw" button and use copy & paste..

kevync has reacted to this post.
kevync