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

join two table

Hi All,

I need help with some task I was trying to do. Essentially, I want to join two tables.

Table 1

Test1.png

Table 2

 

Test2

 

People_ID

unit_cd

27276155

1234

11166155

6364

Desire output

 

output.png

Basically, I want to keep all the rows from the left table and only want to keep common rows from the right table.

But, using left join only gives rows from the left table and using concatenation gives everything

 

Regards

Saif

1 Solution

Accepted Solutions
MayilVahanan

Hi Saifuddin

Try like below

Ta:
LOAD * Inline
[
People_ID,unit_cd
27276155,3611
];

Tb:
Load * Inline
[
People_ID,unit_cd
27276155,1234
11166155,6364
]Where Exists(People_ID);

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

View solution in original post

3 Replies
MayilVahanan

Hi Saifuddin

Try like below

Ta:
LOAD * Inline
[
People_ID,unit_cd
27276155,3611
];

Tb:
Load * Inline
[
People_ID,unit_cd
27276155,1234
11166155,6364
]Where Exists(People_ID);

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

Thanks for your help. It works perfectly. 

saifuddin
Contributor III
Contributor III
Author

Hi 

it works fine but it creates a synthetic key. How do I avoid that? 

 

Thanks