Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: joining three tables with out any common coloumn

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

9 Replies

Re: joining three tables with out any common coloumn

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

Not applicable

Re: joining three tables with out any common coloumn

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

Thanks,

Surendra

rustyfishbones
Honored Contributor II

Re: joining three tables with out any common coloumn

A link table would also need some common columns

Re: joining three tables with out any common coloumn

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

Re: joining three tables with out any common coloumn

Any other workarounds if any please

Re: joining three tables with out any common coloumn

You can even use

concatenate instead of join.

For other work arounds

Regards

ASHFAQ

Re: joining three tables with out any common coloumn

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

Re: joining three tables with out any common coloumn

Thanks Manish

Not applicable

Re: joining three tables with out any common coloumn

Thanks Ashfaq

Community Browser