Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jleberre
Contributor II
Contributor II

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
Nicole-Smith

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.

View solution in original post

3 Replies
Nicole-Smith

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.

its_anandrjs

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

];

Anonymous
Not applicable

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