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

Qlik Sense Left Join with resident tables

I want to do a left join, but with all the forum posts i cant get it to work:

Table1:
LOAD * INLINE
[
A,B
1,aa
2,bb
3,cc
4,dd
](delimiter is ',');

Table2:
LOAD * INLINE
[
A,C
1,01
4,04
](delimiter is ',');

VTable:
Load * Resident Table1;
left join Load * Resident Table2;

Where am i going wrong?

Labels (2)
2 Replies
MayilVahanan

Hi @RobertB07 

Try like below


Table1:
LOAD * INLINE
[
A,B
1,aa
2,bb
3,cc
4,dd
](delimiter is ',');

Table2:
LOAD * INLINE
[
A,C
1,01
4,04
](delimiter is ',');

VTable:
NoConcatenate
Load * Resident Table1;
left join Load * Resident Table2;

DROP Table Table1, Table2;

 

Actually, for your example, don't need to use resident table itself. You can simply use like below


Table1:
LOAD * INLINE
[
A,B
1,aa
2,bb
3,cc
4,dd
](delimiter is ',');

Table2:

Left Join
LOAD * INLINE
[
A,C
1,01
4,04
](delimiter is ',');

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

Thanks for the solution, but in my case i want to keep Table1 and Table2 also. If i remove the drop tabel i got synthetic keys which i dont want.  When i use Qualify on Table1 and Table2 i got no synthetic keys but the VTable is exploded and when i use Unqualify on the VTable the synthetic keys are back.

The only solution seems to load the data 2 times, 1 for the join and 1 for the Qualify which only can come after the join. With the following code i got a corrrect joined table and the two indivdual tables. In my mind i would expect to first load the indivudual tables and then join and still keep them all without the synthetic keys.

 

Vtable:
LOAD * INLINE
[
A,B
1,aa
2,bb
3,cc
4,dd
](delimiter is ',');

left join

LOAD * INLINE
[
A,C
1,01
4,04
](delimiter is ',');

Qualify *;
Table1:
LOAD * INLINE
[
A,B
1,aa
2,bb
3,cc
4,dd
](delimiter is ',');

Table2:
LOAD * INLINE
[
A,C
1,01
4,04
](delimiter is ',');