Is it possible to compare different table names

dbdmoradbdmora Posts: 50
edited January 10, 2012 10:55AM in SQL Data Compare Previous Versions
I have two tables with the same structure but different names on same database. Is it possible to data compare these tables within same database?
Tagged:

Comments

  • Eddie DEddie D Posts: 1,803 Rose Gold 5
    Hi,
    Thank you for your post into the forum.

    The answer to your question is yes, what you are seeking to achieve can be done.

    You select the same database for each data source. Next select the Object Mapping Tab in the Project Configuration.

    You will see that each table name is mapped, for example:
      Table_name 1 mapped to Table_name 1 Table_name 2 mapped to Table_name 2 Table_name 3 mapped to Table _name 3

    So in my example, I wish to map Table_name 1 to Table_name 3.
    First I need to unmap Table_name 1 in the left hand data source with the table of the same name in the right data source. Repeat the unmap process for Table_name 3.

    Now map Table_name 1 in the left hand data source to Table_name 3 in the right hand data source.

    Once you are happy with your project configuration, click the Compare Now button.

    All being well and SQL Data Compare can identify a comaprison key, you will see a set of comparison results that informs on the data differences between the mapped tables.

    Further information is available in the SQL Data Comapre help information available using this LINK.

    I hope the above answers your question.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Ok, I got it to map table_name 1 to Table_name 2 but it didn't compare anything because it could not identify a comparison key. Even though I did set a Comparison Key on both tables under the Table and Views tab first.

    Is this something that will be added in a future release or another way to accomplish this?

    Thanks
  • Eddie DEddie D Posts: 1,803 Rose Gold 5
    Thank you for your reply.

    There is nothing to add, providing you can set a comparison key that can uniquely identify each row of data between the two mapped tables.

    If required choose more than one column or all the columns to make the comparison key.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Brian_ComerBrian_Comer Posts: 2 New member
    Does the object mapping tab still exist in version 15?  I need to do this exact same thing and I do not see the tab.  
  • In SQL Data Compare you will need to go to the Table and Views tab:
     

     
    You can then un-map and re-map the tables here. 
     
    https://documentation.red-gate.com/sdc/setting-up-the-comparison/selecting-tables-and-views#Selectingtablesandviews-Mappingtablesandviews
    Kind regards

    Victoria Wiseman | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.