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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table Join Question

I have table A which has about 20 columns.  Table B is a small table with 4 columns. I need to match the first 3 columns in table B to the same 3 values in table A.  I then need to add the last column in table B to table A.  Please see the below code, I get an error when running this code.  Before this statement is executed both table A and B are loaded.

Left Join ()

LOAD [A1],

[A2],

[A3],

[B4]

Resident

Where [A1] = [B1]

and [A2] = [B2]

and [A3] = [B3];

2 Replies
Not applicable
Author

Hi,

When joined tablesyou need to concatenate the keys.

Ex.:

Tab_A:

A1 & '#' & A2 & '#' &A3 AS KEY_TABLE_A

A4

A5

A6

...

A40

FROM MY_TABLE_A;

LEFT JOIN (Tab_A)

Tab_B:

B1 & '#' & B2 & '#' & B3 AS KEY_TABLE_A

B4

FROM MY_TABLE_B;

nagaiank
Specialist III
Specialist III

Please try the following script

Left Join ()

LOAD [A1],

[A2],

[A3],

[B4]

Resident ;

Where [A1] = [B1]

and [A2] = [B2]

and [A3] = [B3];