XP is just a number | |
PerlMonks |
Re: SQL vs Perl table comparingby CubicSpline (Friar) |
on Nov 07, 2002 at 18:46 UTC ( [id://211180]=note: print w/replies, xml ) | Need Help?? |
I think you are right to question your approach here. Relational databases were made to do the kind of thing you're talking about here. Let's look at how you'd do these things.
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. Good Luck.
~CubicSpline
In Section
Seekers of Perl Wisdom
|
|