Is it possible to compare different table names

Compares and synchronizes SQL database content.

Moderators: Chris Auckland, David Atkinson, richardjm, david connell

Is it possible to compare different table names

Postby dbdmora » Thu Jan 05, 2012 5:10 pm

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?
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby eddie davis » Thu Jan 05, 2012 6:50 pm

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
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software

Postby dbdmora » Thu Jan 05, 2012 9:03 pm

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
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby eddie davis » Tue Jan 10, 2012 4:55 pm

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
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software


Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests