Map one table to multiple tables

Hi, I have a table that has been split up into four different tables in another database. I would like to use SQL Data Compare to copy from the single table to the four different tables (All have the same id column to compare/insert by) but I can't seem to map one-to-many, or map it multiple times.

https://documentation.red-gate.com/sdc14/setting-up-the-comparison/selecting-tables-and-views didn't have anything about it either.

Is this possible? I can create 4 different projects but I am hoping for a better solution than that

Thanks!
Tagged:

Answers

  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi, thank you for your forum post.

    Sadly SQL Data Compare will not allow you to map a single table in one database to multiple tables in another database.

    The only workaround I can suggest, in the database with the 4 tables, create a view that links / joins the 4 tables, map the single table to the view you have created and compare the view to the single table. 

    Or

    In the database with the 4 tables, create a view that links ' joins the 4 tables and in the database with single table, create a view that references the single table,  ensure that the two views created map to each other and then compare the views.

    To be able to compare views, you will need to enable Include Views option listed in the behavior section.

    Many Thanks
    Eddie

    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • ahiyaelahiyael Posts: 2 New member
    Sounds like a good idea, thanks!
Sign In or Register to comment.