Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with left join

Hi,

I have one load and one left join. After that i do a concatenate and then a left join. Now the last left join doesn't have any effect. In this example, I expect George to have a place of 'par'. I have attached the script. Very easy to load and run at your end. Please help.

Thanks,

Ram

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

load * inline

[

name, age

ram,30

raj,40

ramji,50

];

left join

load * inline

[

name,place

ram,kmu

ramji,pap

];

gives

nameageplace
raj40
ram30kmu
ramji50pap

concatenate

load * inline

[

name,age

george,25

Donald,28

];

gives

nameageplace
Donald28
george25
raj40
ram30kmu
ramji50pap

now u do left join on the table above:

left join

load * inline

[

name, place

george,par

];

note that now the join takes place on the combination of two fields name+place as these are the two common fields in the two tables and not only on name.

So u dnt get what u need

To get the desired result, use:

tab1:

load * inline

[

name, age

ram,30

raj,40

ramji,50

];

left join

load * inline

[

name,place

ram,kmu

ramji,pap

];

tab2:

load * inline

[

name,age

george,25

Donald,28

];

left Join(tab2)

load * inline

[

name, place

george,par

];

Concatenate(tab2)

LOAD * Resident tab1;

DROP Table tab1;

View solution in original post

1 Reply
Not applicable
Author

Hi,

load * inline

[

name, age

ram,30

raj,40

ramji,50

];

left join

load * inline

[

name,place

ram,kmu

ramji,pap

];

gives

nameageplace
raj40
ram30kmu
ramji50pap

concatenate

load * inline

[

name,age

george,25

Donald,28

];

gives

nameageplace
Donald28
george25
raj40
ram30kmu
ramji50pap

now u do left join on the table above:

left join

load * inline

[

name, place

george,par

];

note that now the join takes place on the combination of two fields name+place as these are the two common fields in the two tables and not only on name.

So u dnt get what u need

To get the desired result, use:

tab1:

load * inline

[

name, age

ram,30

raj,40

ramji,50

];

left join

load * inline

[

name,place

ram,kmu

ramji,pap

];

tab2:

load * inline

[

name,age

george,25

Donald,28

];

left Join(tab2)

load * inline

[

name, place

george,par

];

Concatenate(tab2)

LOAD * Resident tab1;

DROP Table tab1;