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

hey i am trying to run this simple join but cant proceed , need your help:

Inv_Sales_Temp:

LOAD

[IVCOST],

[IV] AS INV_IV,

IVDATE AS INV_IVDATE,

[CURRENCY]  AS INV_CURRENCY,

FROM [lib://clinton/InvoiceItems.qvd] (qvd);

LEFT JOIN  (Inv_Sales_temp)

LOAD

CUST,

CUSTNAME,

COUNTRY,

CURRENCY

FROM [lib://clinton/customers.qvd](qvd);

LEFT Join (Inv_Sales_temp)

LOAD

CUST,

COST

FROM [lib://clinton/Trans.qvd]

(qvd);

5 Replies
sunny_talwar

I don't see any common fields where you are doing a left join on? You need to have at least one common field for left join to pick anything from your second table.

Anonymous
Not applicable
Author

On what basis you are joining.

You need a common/Unique field between two tables for same.

Anonymous
Not applicable
Author

In your tables, you can join Customer and Trans tables on the basis of CUST field which is common and I guess it is CustomerID,

Final_Table:

LOAD

CUST,

CUSTNAME,

COUNTRY,

CURRENCY

FROM [lib://clinton/customers.qvd](qvd);

LEFT Join (Final_Table)

LOAD

CUST,

COST

FROM [lib://clinton/Trans.qvd]

(qvd);

Hope this will help.

Not applicable
Author

o.k i corrected my script to:

Inv_Sales_Temp:

LOAD

IVCOST,

IV ,

IVDATE  ,

CURRENCY ,

FROM [lib://clinton/InvoiceItems.qvd] (qvd);

LEFT JOIN  (Inv_Sales_temp)

LOAD

CUST,

CUSTNAME,

COUNTRY,

CURRENCY

FROM [lib://clinton/customers.qvd](qvd);

LEFT Join (Inv_Sales_temp)

LOAD

CUST,

COST

FROM [lib://clinton/Trans.qvd]

(qvd);

as you can see the common fields between  InvoiceItems table and  customers table is the currency field and  the mutul fields between customers and trans table is

cust...

Anonymous
Not applicable
Author

Ok, I had mentioned common/unique.

No issue, what error you are getting now.

It should join now.