The following is my issue:
we have an oracle table with 4 fields as key columns. The requirement is to fetch a particular column value from the oracle table for every record in a input sequential file. But the seq. file doesnot have all the fields that make the key in the table.
After pulling out the data from the table into a hash file, is it possible to get a match for a input record from the hashed file with a partial key.
The option we thought of is:
1. pull the table data to a seq. file
2. merge both the input file and table file data using partial keys. Then proceed from there. Will this logic work or is there any alternative way to achieve this?
Hitting a hash file with a partial key - will that work??
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: Hitting a hash file with a partial key - will that work?
You can 'pull' the data from the table to a hash file (instead of seq. file) with the partial keys available in the sequential file as keys. This will avoid any duplicates on this partial keys. Now the point to be noted is here you might lose the records with orginal keys in the target.
nash wrote:1. pull the table data to a seq. file
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
For lookups against hashed files, the rule is "the key, the whole key and nothing but the key", referring to the hashed file's key. Partial key lookups against hashed files are not supported.
If you perform partial key selects against an Oracle table, you may get more than one row returned. Moving these into a hashed file uses a destructive overwrite, so "last one in wins". If this is what you want, then go ahead.
If you perform partial key selects against an Oracle table, you may get more than one row returned. Moving these into a hashed file uses a destructive overwrite, so "last one in wins". If this is what you want, then go ahead.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.