To repair a database, rows need to be copied from one database to another but only if the row does not exist in the target database.
The tables have a primary key but this can't be used as the unique autoincrement ID may not correspond on the target database. We are using a datetime field that should be unique enough for the job. This is a one time operation so efficiency does not matter. MERGE cannot be used (older SQL server)
Table layout is identical and there are between 30 to 100K rows.
Database can be taken offline during the copy.
How can this best be accomplished?