Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sylvain_piccarreta

Merge 2 tables

Hi,

 

I search to merge 2 tables.

Table 1

A    |     B

1    |  France

2    | USA

3    | China

 

table 2

A    |     B

1    |  Europe

 

I want to create a new table merged like it (value table 2 change the value in table 1 for ID 1)

New table

1    |  Europe

2    | USA

3    | China

 

Thanks for your help,

Labels (2)
1 Solution

Accepted Solutions
sylvain_piccarreta
Author

thanks, but in my case, it doesn't work.

 

I find a solution. I create a temp tabble to collect in it with join

temptable:

load A, B as B1 from table1;

join 

load A, B as Bé from table2

After, I do :

Load A, 

for B, I add an IF to detect if Bé is null to take B1 even B2.

 

 

 

View solution in original post

2 Replies
MayilVahanan

Hi @sylvain_piccarreta 

Try with mapping and applymap concept

MapTable1:
Mapping
Load * Inline
[
A | B

1 | Europe
](delimiter is '|');

Table1:
Load A, ApplyMap('MapTable1', A, B) as B Inline
[
A | B

1 | France

2 | USA

3 | China
](delimiter is '|');

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
sylvain_piccarreta
Author

thanks, but in my case, it doesn't work.

 

I find a solution. I create a temp tabble to collect in it with join

temptable:

load A, B as B1 from table1;

join 

load A, B as Bé from table2

After, I do :

Load A, 

for B, I add an IF to detect if Bé is null to take B1 even B2.