in reply to SQL vs Perl table comparing
Let's assume you have Table and BackupTable, which have the exact same columns and a primary key named 'Key'.
1. records existing only in first table
SELECT * FROM Table WHERE NOT EXISTS (SELECT * FROM BackupTable WHERE Table.Key = BackupTable.Key)
2. records existing only in second table
Same thing as 1, but switch the table names.
3. records with identical primary keys, but with different content.
The best I can think of here is to get a list of the primary key values that are in both tables but have different values.
Hopefully, Oracle provides some sort of utility to do this, but if I had to do it through straight SQL those are the things I would try.SELECT Key FROM Table LEFT JOIN BackupTable ON Table.Key = BackupTable +.Key WHERE Table.column1 <> BackupTable.column1 OR Table.column2 <> B +ackupTable.column2 ......
Good Luck.
~CubicSpline
"No one tosses a Dwarf!"
|
|---|