Can I select a record to move and have all related records move with it?

My goal is to move specific customers between databases. I can select the appropriate row in my customer table and move it over, but can SQL Data Compare also find related records? Anything with a foreign key like from our order history table for example. That way the customer and all related data show up in the new database. 
Tagged:

Answers

  • Eddie DEddie D Posts: 1,807 Rose Gold 5
    Hi JoeUSV,
    Sadly the deployment process for SQL Data Compare is not that intelligent.

    Using you example of selecting a single row of data from your customer table to move to the target database, SQL Data Compare will not automatically select the records from dependent tables and include them in the deployment process.

    From the small amount of testing I performed before answering your forum post, the deployment process will most likely fail with conflicts to the foreign key constraints.

    To deploy successfully, you will need to identify the corresponding row of data in each dependent table.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.