I have two tables with identical columns (164 columns actually). The first table T1 holds all original contracts into the system and column A uniquely identifies my contract number. Second table, T2, is a historical table and contains updated contracts. T2 holds all values of the contract, including updated. One contract may be changed more than once, so T2 may have more than one entry for the same contract number.
I need to find and display the differences (values that have been updated) of all contracts (and all instances of each contract) that appear in table T2, between T2 and T1.
There may be a lot of null values for each contract, so I only need to display the column values that appear to be different.
Example:
table T1 table T2
colA colB colC colA colB colC
---- ---- ---- ---- ---- ----
1 10 100 2 20 201
2 20 200 2 21 201
3 null 300 3 30 300
the differences that I need to get are:
colA T1.colC T2.colC
2 200 201
colA T1.colB T2.colB T1.colC T2.colC
2 20 21 200 201
colA T1.colB T2.colB
3 null 30
God help ;-)
thanx
I need to find and display the differences (values that have been updated) of all contracts (and all instances of each contract) that appear in table T2, between T2 and T1.
There may be a lot of null values for each contract, so I only need to display the column values that appear to be different.
Example:
table T1 table T2
colA colB colC colA colB colC
---- ---- ---- ---- ---- ----
1 10 100 2 20 201
2 20 200 2 21 201
3 null 300 3 30 300
the differences that I need to get are:
colA T1.colC T2.colC
2 200 201
colA T1.colB T2.colB T1.colC T2.colC
2 20 21 200 201
colA T1.colB T2.colB
3 null 30
God help ;-)
thanx