Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

left join with all fields

Hi 

I have below two tables.

Table 1

ID Value

1  10

2  20

3  30

 

Table 2

ID  Amount Gender

1   100           Male  

2   200           Female

4   400           Male

5   500

 

So If I left join these 2 tables then expected result should be :

Table 1

ID  Value Amount   Gender

1    10        100            Male

2    20         200           Female

3    30        -                  -

 

this is working fine If I join with specific table mentioned in joining condition as below

Load ID,

            Value

From Table1;

Left join (Table1)

Load ID, 

          Amount

From Table2;

 

But it is not working when I am using * as below as I have only one common key between these tables:

 

Table1:

Load *

From Table1;

left join (Table1)

Load * 

From Table 2;

 

I am getting below results :

ID  Value Amount

1  10          -

2  20          -

3   30        -

 

 

Labels (1)
1 Reply
justISO
Specialist
Specialist

Hi, try to use different Table name as Table1 is already existing and you left joining on it, not your new one. So your script could look like this:

NoConcatenate
MAIN:
Load *
resident Table1;
left join (MAIN)
Load *
resident Table2;

drop tables Table1, Table2;