Reference lookup generated 2 rows

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
MURALI123
Participant
Posts: 46
Joined: Sun Jun 21, 2009 1:37 am
Location: CHENNAI

Reference lookup generated 2 rows

Post by MURALI123 »

Hi
Cany anybody help me in the below Issue:



Reference lookup generated 2 rows. Only the last row was used.

Regards,
Malli
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Pretty much exactly what it said. In your lookup, two different rows matched whatever id was being looked up, so it used the values from the 2nd (last) row to satisfy the lookup condition.

You'll need to go to your lookup source and see if there's a problem that is causing two rows to match. Depending on the source, you might need to modify the SQL (ie: return DISTINCT) or add steps to remove the duplicates in the job to get rid of the message.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Or if you want both successful lookups to produce output, either use a join or select the link in the "Link returns multiple rows" box within the lookup stage.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Server job, so if you really want a 'multi-row result set' you'll need to use an ODBC or UV stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

chulett wrote:Server job...
Doh! One day i will learn to look at that bit...
Post Reply