Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

PROBLEM WITH LEFT JOIN AND INNER JOIN

Hello,

I have a problem with inner join or left join.

In the following script 

LOAD ITEM,
QTY,
DATE,
STORE
FROM [F:\COUPONS.QVD] (qvd);

LEFT JOIN

LOAD STORE,
ITEM,
DATE,
AMOUNT
FROM [F:\SALES.QVD] (qvd);

in some cases the qty of coupons is doubled. 

When from the script i remove the left join or inner join i have $Syn key that is DATE+STORE+ITEM and 

the qty of coupons is correct but in this case i have all the data from the two tables and i want only the matching items from the two ones.

Why is this happening and how can i have correct data with inner join or left join because the number of rows are huge.

Can anyone help me ?

Thank you in advance. 

 

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

try Keep

LOAD ITEM,
QTY,
DATE,
STORE
FROM [F:\COUPONS.QVD] (qvd);

LEFT keep

LOAD STORE,
ITEM,
DATE,
AMOUNT
FROM [F:\SALES.QVD] (qvd);

View solution in original post

3 Replies
Kushal_Chawda

try Keep

LOAD ITEM,
QTY,
DATE,
STORE
FROM [F:\COUPONS.QVD] (qvd);

LEFT keep

LOAD STORE,
ITEM,
DATE,
AMOUNT
FROM [F:\SALES.QVD] (qvd);

Vegar
MVP
MVP

Yes Keep  could do the trick. @Kushal_Chawda  used Left Keep, but Inner Keep is also a possible way depending on your data and what you are trying to achieve

geogou1973
Creator
Creator
Author

Hello Kush,

It is OK. Thank you.