Page 1 of 1

Lookup With Duplicate Records

Posted: Wed Apr 28, 2010 9:27 am
by devidotcom
Hi All,

I have scenario wherein i have to perform lookup with one table one multiple conditions.

For example:
Source Table ====> A
Lookup Table ====> B
Perform lookup on the table based on B.Col3 = 'CC' and A.Col1=B.Col1 to and fetch B.Col2.
Similarly, next condition is on Col3 = 'FF' and A.Col1=B.Col1 to and fetch B.Col4.


I designed this job to have a filter after i read the lookup table and filtered based on the condition Col3 and then used the Col1 to perform lookup with the source. Hence had two reference links from the filter stage to the lookup stage.

In a similar way i have multiple such conditions and hence multiple reference links. I job fails due to the following error message as I might end up getting multiple duplicates records from each of these links.

lkp_PSA_Tbl,0: Multiple lookup tables allow duplicate entries: 4 (/da915m00/IBM/InformationSerer/Server/Projects/ERP_US/DS_TEMP/dynLUT8790f13e691b) and 6 (/da915m00/IBM/InformationSerer/Server/Projects/ERP_US/DS_TEMP/dynLUT8790743d4582)

How do I design this apart from splits them into individual lookup stage.
Appreciate your help.

Thanks

Posted: Wed Apr 28, 2010 4:53 pm
by ray.wurlod
You don't. Each Lookup stage allows only one reference input to deliver multiple rows - that's why you choose the link name from a drop down list.

Multiple inputs delivering multiple rows is getting you into Cartesian product territory - you can end up generating very many rows on the output.