Focal Point
Multi feild Join between a Hold file and Oracle table

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9191033032

May 31, 2007, 12:47 AM
aparna md
Multi feild Join between a Hold file and Oracle table
Hi all,

we have a requirement where in we have to join hold file with Oracle table with multiple keys. is it possible to achieve this?

Thanks
Aparna
May 31, 2007, 02:37 AM
Alan B
This should be possible.

To join to the Oracle table use the syntax:
JOIN
field1 AND field2 AND field3 IN HOLDFILE
TO field1 AND field2 AND field3 in oracletable
END


To join from the Oracle table use the syntax:
JOIN
field1 AND field2 AND field3 in oracletable
TO field1 AND field2 AND field3 IN HOLDFILE
END

the main difference is when you join to a HOLD file the fields you join to have to be in the sequence of the output from the Oracle request, that is, used as sort fields. Otherwise you will get an OUT OF SEQUENCE error.


Alan.
WF 7.705/8.007
May 31, 2007, 09:15 AM
Leah
I agree with Alan, of course depending on where your hold file resides and where your oracle table resides may cause some performance issues. I join hold files back to DB2 tables all the time, but if the hold file is large number of records, I will often pull the DB2 data from the table with a separate request, create a hold file then join the two hold files.


Leah
May 31, 2007, 09:55 AM
Alan B
Very true Leah, a lot of records will give performance issues and dragging data back with a seperate request can be worthwhile.

You can join multiple field from hold to hold, sequence again permitting.


Alan.
WF 7.705/8.007