comparison key in related table
stp
Posts: 2
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
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
Comments
How to set a comparison key that will pull in a value from another table to link on?
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/vi ... hp?t=17810