Problem with lookup condition continue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rhaddur
Participant
Posts: 52
Joined: Mon Mar 13, 2006 7:33 am
Location: mumbai

Problem with lookup condition continue

Post by rhaddur »

1) MY job is having lookup

first lookup with conditon(isnotnull(x ) and isnotnull(y)) --continue and looup is reject

ref
|
|
ds---------lkp-------output


when I am replcing the above datastage job with DB2 Query
where fields
src ref

x (nullable yes) x (nullable yes)
x (nullable yes) y (nullable yes)
a (nullable no)
b (nullable no)
c (nullable yes)

Query

select
a,
b,
CASE WHEN LTrim(RTrim(x)) <> '' THEN x ELSE a END AS x ,
IPBLMSP.IICNL1 AS IICNL1,
CASE WHEN LTrim(RTrim(y)) <> '' THEN y ELSE b END AS y

from srource src
inner join on reference ref
(src.x=ref.x
and src.y=ref.y)

the above query is not working kindly guide me on the same
Rhaddur
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Define "is not working".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
John Smith
Charter Member
Charter Member
Posts: 193
Joined: Tue Sep 05, 2006 8:01 pm
Location: Australia

Post by John Smith »

you got to be careful when you try to mimic a DS lookup using joins within the database. DS lookup is a left outer join.
SAMEENA
Participant
Posts: 31
Joined: Fri Aug 18, 2006 12:13 am
Location: INDIA

Post by SAMEENA »

Hi,
In the query check for nullability should also be there
The query should be like -

CASE when x IS NULL......or CASE when x IS NOT NULL....
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

Look up is also an 'Inner Join' if you drop records that don't match!
Post Reply