Need to get the non-matches

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jayednewman
Participant
Posts: 9
Joined: Fri May 26, 2006 9:23 am
Location: KCMO

Need to get the non-matches

Post 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?
"Go Hogs!"
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post 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)
Wolfgang Hürter
Amsterdam
jayednewman
Participant
Posts: 9
Joined: Fri May 26, 2006 9:23 am
Location: KCMO

Post 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?
"Go Hogs!"
jatayl
Premium Member
Premium Member
Posts: 47
Joined: Thu Jan 19, 2006 11:20 am
Location: Rogers, AR

Post 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. :-)
Post Reply