Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jleberre
New Contributor

Join

Hello

I would like to merge 2 tables like this:

A, B

1, xx

2, yy

A, C

1, aa

1, bb

2, cc

A, B, C

1, xx, aa

1, xx, bb

2, yy, cc

Do I have to use a left join, or another?


thanks

1 Solution

Accepted Solutions

Re: Join

Left join will do it.  Your code will look something like this:

Table1:

load * inline [

A, B

1, xx

2, yy

];

left join (Table1)

load * inline [

A, C

1, aa

1, bb

2, cc

;

I've also attached an example file.

3 Replies

Re: Join

Left join will do it.  Your code will look something like this:

Table1:

load * inline [

A, B

1, xx

2, yy

];

left join (Table1)

load * inline [

A, C

1, aa

1, bb

2, cc

;

I've also attached an example file.

Re: Join

Yes left join worked well here

A:

LOAD * Inline

[

A, B

1, xx

2, yy

];

Left Join(A)

LOAD * Inline

[

A, C

1, aa

1, bb

2, cc

];

momin_tahemas
Contributor

Re: Join

hi

you can use LEFT JOIN

Like

    Table1: 

    load * inline [ 

    A, B 

    1, xx 

    2, yy 

    ];  

    left join (Table1)

    Table2:

    load * inline [ 

    A, C 

    1, aa 

    1, bb 

    2, cc 

    ]; 

output:

A B C
1xxaa
1xxbb
2yycc

Regards

Tahemas Momin

Community Browser