Page 1 of 1

right outer join

Posted: Sat Apr 15, 2006 3:31 pm
by tostay2003
Hi all,

Does anyone have idea to implement right outer join in datastage.

for instance,

A.Value=B.Value(+)

Where B is the look up.

Regards

Posted: Sat Apr 15, 2006 3:43 pm
by ray.wurlod
It is possible to prove that A RIGHT OUTER JOIN B ON condition is equivalent to B LEFT OUTER JOIN A ON condition for an equijoin, though I don't propose to provide that proof here.

Stream input from table B and perform regular lookups against table A (or a hashed file populated from table A). Do not constrain the output of the Transformer stage and there is your outer join. Voila!

Posted: Tue Apr 18, 2006 8:58 am
by kumar_s
The same could also be realised using merge stage.

Posted: Tue Apr 18, 2006 9:02 am
by kcbland
All hashed, ODBC, and OCI lookups to the primary input stream are equi-joins, think of it like a cursor lookup. A found row is not required.