How to display the difference found between same-formated-tables of different Databases in Ms SQL 2005 and 2000
Posted on 2012-03-14
We have 4 databases. Each database has the exact same formatted tables, just with different data.
There is a specific table (CustTable) that within all 4 databases, has the same data; that is an AccountNumber and Description. In all 4 DB there are the same AccountNumber. We have found that within the Description column, there are differences, not many, but does exist.
We are trying to do is prepare a script to display only the differences in description between all database of the same Table.
See pic included for an example of our situation and what we are trying to do.
We want to compare the following manner:
Comp1 >> Comp2, Comp2 >> Comp3 and Comp3 >> Comp4.
The script we are using, upto now is the following