Perform join with OR condition

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
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Perform join with OR condition

Post by manoj_23sakthi »

Is it possible to perfor join with or condition in datastage?

Eg :

T1:
a,b
1,2
2,2

T2:

a,c
1,d
0,e

i need o/p as:

if T1.a=T2.a or T2.a=0 then c
O/p
a,b,c
1,2,d
2,2,e
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Perform join with OR condition

Post by chulett »

manoj_23sakthi wrote:Hi
sorry for this..
I am not able to post this in new post.
Why not? All you need to do is click on Post new topic anywhere in the appropriate forum to start a new post. :?

Split out for you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Not with the join stage.

What would/needs to happen if there is more than one row in T2 with column a = 0?
Is the row with 0 meant to be a "default" value for c if there is no match on a?

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Post by manoj_23sakthi »

Hi,
In T2 it won't have more than one value as default.
yes it like default value if it not match.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... what's your workaround?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply