Multiple rows output required from lookup

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
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Multiple rows output required from lookup

Post by mac4rfree85 »

Hi Guys,

My Source records are unique records. But my reference records contain multiple records for the same key. Now, i want output with multiple records.
Source record
AA 12B 2
BB 23Y 3
Reference recrods
AA 12B U-
AA 12B Y-
BB 23Y I+
BB 23Y O-
Output required
AA 12B U- 2
AA 12B Y- 2
BB 23Y I+ 3
BB 23Y O- 3

My database is oracle. So, i tried to create a hash file for the reference records but hash file only stored unique records.

Can somebody help me in resolving this issue.

Thanks!!
Mac4rfree
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't use a hashed file. Retrieve them directly from Oracle.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Post by mac4rfree85 »

Ray thanks for the input. But even though i am able to see the multiple records for the same key when i click on view data, I am getting only unique records when i run the job. I am using Oracle Connector Stage.

could you please guide me as how to set up the settings in the reference side so that multiple records will flow for the same key value.
Mac4rfree
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Use ODBC which allows a 'multi-row result set' to be returned. That or use the UV stage to access your hashed file. Unless things have changed, those were the only two options for a multiple record lookup.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do an exact search here for "multi-row result set".
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply