Can any one have the code to compare two tables.. data . and report the data in which columns it is changed...
My case is :
Tab1 has columns 200 and Tab2 has 200 columns.
Every day Tab1 is refreshed and Tab2 will contain the last data of Tab1.. in this case i need to compare the changed data in Tab1 comparing with the Tab2..
Depending on how many rows are in these tables, and if you have the liberty to do so, you might also consider implementing a timestamp column on both tables and an update trigger on tab1 to update the timestamp when any changes to the table (tab1) are made. If you also create an index on the primary key and this timestamp on both tables, the query may be more efficient. The drawback to this though, is that you will retrieve rows that have been changed, and then changed back to their original value. The timestamps will be off but the data may match. This does, however, have the advantage of showing which rows were active.