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

Help with simple left join

I have a qvd called accounts, with a NAME field.

accounts.png

I have another database table called customer_dim, which has a name field.

I want the final name table to only have the fields in the NAME from Accounts, and anything associated with those from Customer_dim.

The below isn't working, any ideas?

Thanks

cust.png

here is the errorerror.png

1 Solution

Accepted Solutions
Anil_Babu_Samineni

I think you just added error, Any how can you do that Left join for Accounts like below for Load statement

Left Join (Accounts)

Load * Resident Customers;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

11 Replies
Anil_Babu_Samineni

How your data model looks when you load simple join from 2 tables?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

I'm not sure what you mean by simple join

Not applicable
Author

by renaming both NAME and name fields to Customer, it just combines the two. I only want the fields in NAME

Anil_Babu_Samineni

I think you just added error, Any how can you do that Left join for Accounts like below for Load statement

Left Join (Accounts)

Load * Resident Customers;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

I tried it, but my Customer table is still a combination of the two tables.

Anil_Babu_Samineni

can you share the script rather than image on wall

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Accounts:

Load

ALPHA_PRODID as AlphaProdID,

NAME as Customer

From D:\BI Docs\QVD Generators\Accounts.qvd (qvd)

where DISPOSITION = 'Active'

and TYPE_OF_SITE = 'HQ'

and ACCOUNT_TYPE = 'Customer';

Customer:

 

Load

name as Customer,

customer_group,

customer_key;

SQL SELECT

    customer,

    "customer_group",

    "customer_key",

name

FROM PUB."customer_dim";

/*

Left Join (Accounts)

Load * Resident Customer

;

*/

Anil_Babu_Samineni

May be this is last question to you, Does this select and Load clauses are same fields?? Or typo error? Because, Load statement it showing like name is the field but SELECT statement showing customer? I am sorry if i ask irrelevant question

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful