Page 1 of 1

Lookup Stage Condition!

Posted: Thu May 24, 2007 5:39 pm
by ds2000
Hi,

I have PX job and want to lookup with areacode and xchngcode if found then send to target, if not found then lookup with areacode and xchngcode with wildcard (***) instead of actual xchngcode. e.g
areacode= 631
xchngcode= 514 (if not found then lookup with *** instead of 514).

Thanks in advance.

Posted: Thu May 24, 2007 10:09 pm
by JoshGeorge
In the reject link of the look up stage specify one more look up with wildcard.

Posted: Thu May 24, 2007 10:33 pm
by ray.wurlod
What precisely do you mean by "lookup with wildcard"? The explicit value "***"? Or all possible area codes? The latter isn't possible with a Lookup stage.

Explicit Value of *** in lookup

Posted: Fri May 25, 2007 5:27 am
by ds2000
Hi Ray,
I want Explicit Value of *** in 2nd lookup.

Hi Josh,
I dont want to use reject anyother option ?

Posted: Fri May 25, 2007 2:41 pm
by ray.wurlod
Use Continue on the first, make the second lookup conditional on one of the returned columns from the first being NULL, and use Drop on the second. Or use Continue on the second and filter out the NULLs downstream if you need to count them.

Posted: Fri May 25, 2007 3:40 pm
by ds2000
Ray,
Would you explain it in detail plz.
do i have to do lookup and then output to transformer to use the condition?
how would i use *** value there ?
can i use 2/3 lookups at the same time, what would be order of execution. first row would be checked for each lookup.

Posted: Sat May 26, 2007 1:34 am
by JoshGeorge
Give "Lookup Failure" condition as continue in both the look up stages. After the first look up, check for NULL in your look up result field and if that is true substitute it to '***' and do the look up in the second one.

Alternatively you can design your job with reject link for the first look up stage and then do the second look up with wildcard and finally join all the records using funnel stage.

Posted: Sat May 26, 2007 7:32 pm
by vijayrc
JoshGeorge wrote:Give "Lookup Failure" condition as continue in both the look up stages. After the first look up, check for NULL in your look up result field and if that is true substitute it to '***' and do the look up in the second one.

Alternatively you can design your job with reject link for the first look up stage and then do the second look up with wildcard and finally join all the records using funnel stage.
You can have the second reference data link on the same lookup with just areacode as key to the input and thereby xchange can be skipped.

Re: Lookup Stage Condition!

Posted: Sat May 26, 2007 8:26 pm
by JoshGeorge
OP posted in PX forum under server section saying he is using a PX job :lol:
vijayrc wrote:You can have the second reference data link on the same lookup with just areacode as key to the input and thereby xchange can be skipped
ds2000 wrote:I have PX job
ds2000 wrote:I want Explicit Value of *** in 2nd lookup