Duplicate+Search+Merge+Database

RootsMagic 4+ creates a database file with the same root name as the .rmgc file but with the extension .DUP when Tools > Merge > Duplicate Search Merge is started. It contains one table that serves the Merge dialog until it is exited. This database is unused thereafter until the next Duplicate Search Merge is launched at which time it is emptied and re-filled. When in use, this database is ATTACHed to the main database connected to RM's SQLite engine.

See Sheet: 'DUP database' on Database Design Spreadsheets.

=Query: MarkNotProblem= code format="sql" -- MarkNotProblem.sql -- 2010-02-21 ve3meo -- equivalent to a hypothetical Select All not Merged and -- mark as 'Not a Problem' in the Duplicate Search Merge dialog,instead -- of having to hit Alt-N repeatedly. -- Uses the database file RMdatabasename.DUP created by Duplicate Search Merge -- to update the ExclusionTable. -- Use it after merging all those that are truly duplicate (sets Merged flag=1).

ATTACH DATABASE 'path and filename of .DUP' AS DUP; BEGIN TRANSACTION; INSERT OR ROLLBACK INTO ExclusionTable SELECT NULL, 1, ID1, ID2 FROM DupTable WHERE Merged=0 EXCEPT SELECT NULL,1,ID1,ID2 FROM ExclusionTable; END TRANSACTION; -- END SQL code