Problem in 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
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Problem in lookup

Post by cosec »

Hi,

I am performing a lookup and the result I get is not the desired result.
SrcTable:B,C
LkpTable:A(Key),B,C,D

The lookup is based on the Column B

1.I unchecked the key in Column A of the lkpTable
2.I connected the SrcTable Col B to LkpTable Col B

My Objective is to obtain column D if the SrcTable.Col B
Matches LkpTable.Col B and SrcTable.Col C > LkpTable.Col C

I did a validation for the above rule in the transformer for the respective column but unfortunately it doesnt give me the correct result...

Pls Advice
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Did u try giving this condition in the lookup stage link constraints? See if the output is different.
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Re: Problem in lookup

Post by cosec »

I resolved the issue by using a custom SQL statement on the lookup Database:

SELECT START_DATE, END_DATE FROM YourHashedFileName WHERE START_DATE <=? AND END_DATE >=?;

(Used the above logic from a contributor )


Thanks a lot guys
Post Reply