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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

join tables in the script

Hi,

There are two resident tables in my model.

table1 has the fields A,B,C,D,E,F,G, E.

table2 has the fields A,B,C,X.

I want to join them in the script.

The condition is like that: if values in the fields A,B,C coincide, then add value of the field X to a particular row in resident table1.

Am I right that the join function is needed? How can I apply it?

Thank you in advance,

Larisa

1 Solution

Accepted Solutions
maxgro
MVP
MVP

inner join (table1)

load *

resident table2;

drop table2;

but your 2 tables are already associated, do you really need to join?

To Join or not to Join

View solution in original post

4 Replies
maxgro
MVP
MVP

inner join (table1)

load *

resident table2;

drop table2;

but your 2 tables are already associated, do you really need to join?

To Join or not to Join

Anonymous
Not applicable
Author

I read that a multiple association between tables (via 3 common fields) in not good.

Am I right that the best way is to create an integrated key field and not to join the tables?

load

A & ' | ' &  B & ' | ' & C & ' | ' & D as Key

...

Anonymous
Not applicable
Author

If you join, there is no problem - all common fields will be compared.

If you want to keep the tables separate, you better create key field, for example

A&B&C as Key

in both tables

But, you have to drop the A, B, and C from at least one of the tables to avoid synthetic keys.

Anonymous
Not applicable
Author

I see. Thank you!