Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

Data load editor join tables

Hi guys,

I have two tables: A and B in data load editor, with a same field: CUSTOMER, in which way will QLIK SENSE automatically join this two tables on CUSTOMER field (INNER, OUTER, LEFT, RIGHT)?  

Thanks in advance!

1 Solution

Accepted Solutions
jerifortune
Creator III
Creator III

You can explicitly specify the joining table name. For example

tableB:
Load customerID, name
From <Source>;

Left Join (tableB)

tableA:

Load customerID, joiningDate

From <Source>;

Hope this helps

View solution in original post

12 Replies
OmarBenSalem

full outer join

wanyunyang
Creator III
Creator III
Author

Thanks!

If my two tables are in two sections in data load editor, and I want to do A left join B, what should I do?

jerifortune
Creator III
Creator III

You can explicitly specify the joining table name. For example

tableB:
Load customerID, name
From <Source>;

Left Join (tableB)

tableA:

Load customerID, joiningDate

From <Source>;

Hope this helps

wanyunyang
Creator III
Creator III
Author

I did something like (script already simplified):

table:

SELECT customer.No_ AS Customer_No, customer.Name AS Customer

FROM customer;

LEFT JOIN (table)

SELECT s."Customer No_" AS Customer_No, s.Amount AS sales_Amount

FROM sales s;


LOAD * Resident table;

When I create a pivot table with dimension Customer_No and measure SUM(sales_Amount), every SUM result is doubled. I checked my SQL query in DBeaver, the result is correct. Why is it doubled from data load editor?

jerifortune
Creator III
Creator III

I suspect you have  duplicate records  in your customer table. You can comment on other tables in your data model and remove or comment on LEFT JOIN (table). The two tables will be associated using the Customer_No. Try your pivot table again.

wanyunyang
Creator III
Creator III
Author

This is what I get after commenting:

111.PNG

The strange thing is when I do Count(Amount) directly in pivot table column 2, the result duplicates. But if I do COUNT(Amount) GROUP BY... in the script, result shown in column 3, I get the right answer. Any idea?

wanyunyang
Creator III
Creator III
Author

Actually in column 2, everything shows 2, not duplicated.

jerifortune
Creator III
Creator III

Could you share a sample qvf  file?