Page 1 of 1

Join in hash file

Posted: Wed May 18, 2005 8:14 pm
by kab123
Hi,

I am trying to do a lookup using a hash file..
I have ColA in seq file and ColA in Hash file(both files same structures)...I wanted to know how can I get a ColA data from hashfile if there is no match found in seq file but we have in hash file...(basically a outer Join)..
I tried to use merge stage, but having problems with It..Warning !!! "Construct Hash file failed"

Thanks

Posted: Wed May 18, 2005 10:37 pm
by nchincholikar
Hi,
For this You can not create a hash file as a driving file to bring all records(i.e.Outer join).You need to do this in 2 pass,first create a hash file from sequential file and then this newly created hash file can be used as a driving file.

Regards,
Narendra

Posted: Tue May 24, 2005 10:03 am
by anupam
In the contratint you have to write that wherever the HashFile(ColA) <> SeqFile(ColA). And u will get all the rows from Hash file which are not present in the Sequential File.

Posted: Wed Sep 14, 2005 4:54 pm
by rhettbutlernc
How can I do a full outer join using Hash. I need to get the ColA value if it is present either in the driving file or the look-up file.

-Thanks

Posted: Wed Sep 14, 2005 7:18 pm
by ray.wurlod
Not possible using a Hashed File stage. This uses the primary key, the whole primary key, and nothing but the primary key.

How would you do it if one table were Oracle and the other DB2? You can do the same with anything and a hashed file, if you access the hashed file via a UV stage.