Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
aydiniletisim
Contributor III
Contributor III

Inner Join over a specific column

How can I inner join this two tables over ID column or ID2 column? When I just say inner join Qlik sense produce an empty table. 

 

/*

table 1

ID           ID2

1             5

3             9

 

table 2

ID           ID2

5             5

7             5

1             3

*/

 

LOAD

    ID,

    ID2

FROM [lib://AttachedFiles/table 1 - Kopya.xlsx]

(ooxml, embedded labels, table is Sayfa1);

 

Inner Join

 

LOAD

    ID,

    ID2

FROM [lib://AttachedFiles/table 2 - Kopya.xlsx]

(ooxml, embedded labels, table is Sayfa1);

 

 

/*

Result

ID     ID2

-         -

*/

Labels (3)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, between 2 tables you must have all unique column names except 2 which you will use as inner join key. Now you have 2 names, ID and ID2 in both tables, and when you try to inner join 2 tables, qlik is trying to create synthetic key ID+ID2 and there are no rows where ID and ID2 are the same in both tables (so you receive empty table as result). Simple, rename one ID to other name, or just load only one column from table 2.

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, between 2 tables you must have all unique column names except 2 which you will use as inner join key. Now you have 2 names, ID and ID2 in both tables, and when you try to inner join 2 tables, qlik is trying to create synthetic key ID+ID2 and there are no rows where ID and ID2 are the same in both tables (so you receive empty table as result). Simple, rename one ID to other name, or just load only one column from table 2.

aydiniletisim
Contributor III
Contributor III
Author

Thanks for your help