I have to compare 2 tables having different structure,i.e. in one table there are some additional columns at the end. I have to do a sample record comparison . Please suggest if Minus query will work.
Also, suggest how I can highlight the mismatched data. Earlier, I was using a manual process by exporting the records into excel and then comapring and highlighting the data values. Can it be possible that the mismatched values are highlighted by comparing in teradata.
Thanks in Advance!
A minus will work for comparing the data in the columns from table1 to table2 on columns that exist on both.
For extra columns you can also use minus.
Sel columnname from dbc.columnsv where databasename = dbname and tablename = 'table1'
Sel columnname from dbc.columnsv where databasename = dbname and tablename = 'table2';
Top query must have table with extra columns.
Many Thanks for your reply.
I am planning to use the below approach :
Please suggest any modification/improvements to the above approach.