Page 1 of 1

Problem in lookup

Posted: Wed Jul 04, 2007 3:01 am
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

Posted: Wed Jul 04, 2007 4:06 am
by Maveric
Did u try giving this condition in the lookup stage link constraints? See if the output is different.

Re: Problem in lookup

Posted: Wed Jul 04, 2007 4:16 am
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