Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Tags (1)
1 Solution

Accepted Solutions
Not applicable

JOINS - How do I JOIN these tables

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

2 Replies
Not applicable

JOINS - How do I JOIN these tables

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

JOINS - How do I JOIN these tables

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!