Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem regarding join

Hi all. I have a problem regarding shipping address and billing address in a table. The problem is: Table1: ShippingAddressID BillingAddressID Table2 AddressID How can i do that in the interface i have only AddressID that is mapped to both fields in Table1 ?
1 Solution

Accepted Solutions
Not applicable
Author

Hello Christian,

if I got you right, you have in one table two times an address_id pointing to one (address-) table. I would load the address-table twice with different table names and qualified fieldnames(!) using code similar to:

BillingAddress: load . . . AddressID AS BillingAddressID; . . . City AS BillingCity; . . .


ShippingAddress: load . . . AddressID AS ShippingAddressID; . . . City AS ShippingCity;


Regards, Roland

View solution in original post

7 Replies
boorgura
Specialist
Specialist

You will have to replicate the field in Table 2.

AddressID as BillingAddressID,
AddressID as ShippingAddressID

Not applicable
Author

Hi and thank you for your reply.

I have allready did that but the problem is that it creates a syntetic key.

boorgura
Specialist
Specialist

you can create a key using both the fields.

(may be by just concatenating them)

and then rename the individual fields differently in the 2 tables.

if all you want to do is get the syn key out.

But I believe the syn key should be doing the same thing for us implicitly.

Not applicable
Author

Hi.

BillingAddress and ShippingAddress are not allways the same. I cant see how i can create a concatenated key from those fields because sometime

BillingAddress & ShippingAddress <> AddressID & AddressID.

Not applicable
Author

Hello Christian,

if I got you right, you have in one table two times an address_id pointing to one (address-) table. I would load the address-table twice with different table names and qualified fieldnames(!) using code similar to:

BillingAddress: load . . . AddressID AS BillingAddressID; . . . City AS BillingCity; . . .


ShippingAddress: load . . . AddressID AS ShippingAddressID; . . . City AS ShippingCity;


Regards, Roland

Not applicable
Author

Hi Roland.

Thank you for the solution. This solution removes the synthetic key.

Regards,

Cristian.

kaushalview
Partner - Creator II
Partner - Creator II

Hi,
Use this


AddressID AS BillingAddressID

AddressID AS ShippingAddressID