How to join a column in another table (without Join)

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
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

How to join a column in another table (without Join)

Post by laknar »

I have two columns in one table(A1) and another in A2.

A1 A2
------- ---------

abc bcd cde
----- ----- ---------

csdc ghng 34
dfvfd bfgb wer
vcfdcv bgf 65
vdf gfr 567
vg ggrf 575
v yhgr 765
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

"The key is not to bend the spoon with your mind, or join the two tables with no join, but rather to understand that there is no spoon only sporks. "

Use a Look-up stage and define a literal-valued key to join the two tables containing the columns.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a key (perhaps the per-partition row number) on each input to the Lookup, Join or Merge stage, probably using a Column Generator stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post by abc123 »

It is really hard to figure out what he is trying to do. Does he have 2 tables with 1 column each, A1 in table 1 and A2 in table 2? Does he have 2 tables with common primary keys and then a column in each named A1 and A2? If it is the latter, then obviously lookup would be the most appropriate solution.
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

Hi all,

I have acheived this through UNION ALL.

Laknar
Post Reply