Red Gate forums :: View topic - comparison key in related table
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

comparison key in related table

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
stp



Joined: 21 Aug 2012
Posts: 1

PostPosted: Tue Aug 21, 2012 2:38 pm    Post subject: comparison key in related table Reply with quote

Hi there,

I want to compare two tables(lets call them tblPeople). The datasets have a column 'Id' which is linked to another table(tblRegistry). The Id columns are not the same in the two databeses but in every db itself the Id in tblPeople matches the Id in tblRegistry. The tblRegistry has a column XId. So every dataset in tblPeople is connected via the Id to a XId in tblRegistry and the XIds are matching overall the two databases.

Now I want to compare the tables tblPeople with the comparison key XId from tblRegistry.

How can I do that and is it possible via commandline?

Thanks
stp
Back to top
View user's profile Send private message
contisma



Joined: 12 Jul 2013
Posts: 1
Location: Perth, Australia

PostPosted: Fri Jul 12, 2013 4:22 am    Post subject: comparison key in related table Reply with quote

looking for the same solution if it is possible?

How to set a comparison key that will pull in a value from another table to link on?
Back to top
View user's profile Send private message
wdhenrik



Joined: 19 Jul 2012
Posts: 12

PostPosted: Tue Jul 16, 2013 12:00 am    Post subject: Reply with quote

Just to ensure I'm understanding your situation, you want to compare the join of two tables with the same table join in another database, ignoring the column used in the join condition.

If that is correct, create a view in both locations that generates the results you want to compare. Perform the comparison using these views, set a logical Key value (e.g. XId?) and ignore the real PK column differences.

**Update**
I just tried comparing views and they don't appear in SQL Data Compare, even though the tab indicates they are comparable. I've created another forum post for this.
*Answered*
http://www.red-gate.com/MessageBoard/viewtopic.php?t=17810
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group