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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

JOINS - How do I JOIN these tables

Hi All,

I have 2 tables. The 2nd table I want to join to my 1st table whereever the common fields match. So to illustrate

Table1:

Field a, Field b, Field c, Field D, Field E, Field F

Table2:
Field D, Field E, Field F, NEWFIELD  G

I want fields D, E and F to reference to where those same values appear in table 1 (So there are 3 common fields). Whenever they do it needs to then add NEWFIELD G to table 1.

Thanks,
Byron

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

I think it shouold be something like:

Table1:

Field D & Field E & Field F as KEY_FIELDS,

Field a,

Field b,

Field c,

Field D,

Field E,

Field F

;

Table2: //you can actually leave this line out

LEFT JOIN Table1

Field D & Field E & Field F as KEY_FIELDS,

NEWFIELD G

;

After this I think you can also do a

DROP field KEY_FIELDS FROM Table1;

to remove the KEY field

View solution in original post

2 Replies
Not applicable
Author

I think it shouold be something like:

Table1:

Field D & Field E & Field F as KEY_FIELDS,

Field a,

Field b,

Field c,

Field D,

Field E,

Field F

;

Table2: //you can actually leave this line out

LEFT JOIN Table1

Field D & Field E & Field F as KEY_FIELDS,

NEWFIELD G

;

After this I think you can also do a

DROP field KEY_FIELDS FROM Table1;

to remove the KEY field

Not applicable
Author

Thanks it sounds right, my model is a little complicated, so kinda realising this won't work. Need to clean things up a bit first I rate Thanks Faizoel!