Page 1 of 1

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

Posted: Mon Jul 21, 2008 7:51 am
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

Posted: Mon Jul 21, 2008 8:22 am
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.

Posted: Mon Jul 21, 2008 3:10 pm
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.

Posted: Fri Jul 25, 2008 8:05 am
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.

Posted: Fri Jul 25, 2008 10:26 pm
by laknar
Hi all,

I have acheived this through UNION ALL.

Laknar