• ryetimothy (8/27/2014)


    Someone I work with created the wrong ODBC connection and entered data in the wrong database (old copy on an old server that's about to be decommissioned) and I need to move the data to the new location. Transferring most of the data will be a breeze but there's two tables that are causing me problems because one of the table is linked to the other using a foreign key. I'm concerned about maintaining the relational integrity of the tables and updating the foreign key in the child table based on the new primary key in the parent table. Could anyone give me some advice on how to proceed?

    Quick thought (if I got this right), copy both tables without the constraints to the correct server/database. Then run a query that returns any entries violating the foreign key constraints. If "three green" then reinstate the constraints.

    😎