Hi
(1)
Currently I have two relevant input columns attached to the Key expression columns of the lookup...and then I have a stage variable to check if they match or not and if successful to extract relevant fields from the lookup....for eg the check expression is :
If Input.Col1=Lkp.Col1 And Input.Col2=Lkp.Col2 Then 1 else 0
Is this correct ? and is there a better way to do it ?
(2)
My Lookup doesnt have any matches but I get a warning as follows:
Reference lookup generated 82 rows. Only the last row was used.
Do I need to check on anything ?
Thanks
lookup
Moderators: chulett, rschirm, roy
I created the lookup table with no match. Anyway when I chose the "generate sql" option it seemed to work right.....but doesnt for"Enter SQL"
I am doing a lookup on the database and not hash file.....by the way is it ok to do a lookup on the database it self without hashing ??
I am doing a lookup on the database and not hash file.....by the way is it ok to do a lookup on the database it self without hashing ??
ArndW wrote:cosec - how did you verify this? Since DataStage found 82 matches on the key you supplied, yet you are certain there are not matches you have eitehr got a problem with your logic or have discovered a bug in DataStage.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your constraint expression is not correct. If the lookup fails, columns from Lkp will return NULL. Using NULL in a comparison is not defined. A better constraint expression would be Not(IsNull(Lkp.Col1)).
You don't need to check Col2, and you don't need to check that the returned values are the same as the stream input values - they must be if these are the reference keys.
You don't need to check Col2, and you don't need to check that the returned values are the same as the stream input values - they must be if these are the reference keys.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.