Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

joining three tables with out any common coloumn

Hi all,

I been posed by this question by a colleague.

here is the scenario.

there three tables

table1 :

A,

B,

C

table2:

E,

F,

G,

Table3:

H,

I,

J

and the requirement is i need to use these three tables and create a new table where i just need the first coloumns from the three tables.

Please help me with this.

the out put could be like this as per the question

Table 4:

A,

E,

F

i thought of using a link table to connect all three but i am not sure whether i am taking the correct approach or not.

Please guide me through it

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Then use like this

table4 :

A,

//B,

//C

Join

//table2:

E,

//F,

//G,

//Table3:

join

H,

//I,

//J

It will create Cartesian product for you.

Regards

ASHFAQ

View solution in original post

9 Replies
MK_QSL
MVP
MVP

Using what logic you want A E and F in Table 4... Can you please elaborate little more on this?

Not applicable
Author

Honestly i am not after any specific logic i am curious to know in what ways this can achieved.

Thanks,

Surendra

rustyfishbones
Master II
Master II

A link table would also need some common columns

ashfaq_haseeb
Champion III
Champion III

Then use like this

table4 :

A,

//B,

//C

Join

//table2:

E,

//F,

//G,

//Table3:

join

H,

//I,

//J

It will create Cartesian product for you.

Regards

ASHFAQ

Not applicable
Author

Any other workarounds if any please

ashfaq_haseeb
Champion III
Champion III

You can even use

concatenate instead of join.

For other work arounds

Regards

ASHFAQ

MK_QSL
MVP
MVP

T1:

Load *, RowNo() as No Inline

[

  Field

  A

  B

  C

];

NoConcatenate

T2:

Load *, RowNo() as No Inline

[

  Field

  E

  F

  G

];

NoConcatenate

T3:

Load *, RowNo() as No Inline

[

  Field

  H

  I

  J

];

NoConcatenate

Load Field Resident T1 Where No = 1;

Load Field Resident T2 Where Match(No,1,2);

Drop Tables T1, T2, T3;

Not applicable
Author

Thanks Manish

Not applicable
Author

Thanks Ashfaq