Page 1 of 1

Need to get the non-matches

Posted: Wed Mar 19, 2008 11:41 am
by jayednewman
I currently have a sequential file that has 12,669,842 records and an Oracle table with roughly the same number of rows. What is the best way to get non-matched rows from the Oracle table?

I've thought about just creating two hashed files and using my sequential file/hashed file as the reference stream, but there has to be a better way to do this. What about putting the table to a sequential file and just doing a merge, then filter out the non-matches. Any suggestions?

Posted: Wed Mar 19, 2008 2:15 pm
by WoMaWil
You have two non-matches:

(1) Those, which are in the seq-File and not in Oracle
(2) Those, which are in Oracle and not in seq

One way is to read the the key of the seq-file completly into oracle and make there two minus.

(1) minus (2) and
(2) minus (1)

Posted: Thu Mar 20, 2008 1:49 pm
by jayednewman
WoMaWil wrote:You have two non-matches:

(1) Those, which are in the seq-File and not in Oracle
(2) Those, which are in Oracle and not in seq

One way is to read the the key of the seq-file completly into oracle and make there two minus.

(1) minus (2) and
(2) minus (1)
I need the rows that are in the Oracle table and not in the sequential file. A lookup seems to take way too long. Any suggestions on the best way to handle this?

Posted: Thu Mar 20, 2008 1:52 pm
by jatayl
jayednewman wrote:
WoMaWil wrote:You have two non-matches:

(1) Those, which are in the seq-File and not in Oracle
(2) Those, which are in Oracle and not in seq

One way is to read the the key of the seq-file completly into oracle and make there two minus.

(1) minus (2) and
(2) minus (1)
I need the rows that are in the Oracle table and not in the sequential file. A lookup seems to take way too long. Any suggestions on the best way to handle this?
Load the seq file to a table. :-)