Is it possible to compare different table names
dbdmora
Posts: 50
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
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
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Is this something that will be added in a future release or another way to accomplish this?
Thanks
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
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
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
Victoria Wiseman | Redgate Software
Have you visited our Help Center?