Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
jduluc12
Creator
Creator

left join adds extra rows to the table

Hi,

I have this script.

 

[Table1]:
LOAD * INLINE [
    F1, F2, F3
    123, 100, tere
    234, 200, we
    234, 300, rwerer
];


[Table2]:
LOAD * INLINE [
    F1, F4
    123, ter
    234
    234
    
];

left join (Table1)
load F1, F4
Resident Table2 where not IsNull(F4);

 

it results in the following table

jduluc12_0-1649308244450.png

it adds extra rows for 234. 

why is it happening and how can I prevent it. 

The desired output is 

123 100 tere ter
234 200 we  
234 300 rwerer  
Labels (1)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, seems you want to join only distinct values here, so try add this prefix, like:

left join (Table1)
load distinct
F1, F4 ...

In other hand, you can try to filter not isnull(), but rather empty F4, like:

... Resident Table2 where F4<>'';

as I believe using inline these empty/null values are treated somehow strange.

View solution in original post

1 Reply
justISO
Specialist
Specialist

Hi, seems you want to join only distinct values here, so try add this prefix, like:

left join (Table1)
load distinct
F1, F4 ...

In other hand, you can try to filter not isnull(), but rather empty F4, like:

... Resident Table2 where F4<>'';

as I believe using inline these empty/null values are treated somehow strange.