Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate joined tables

Hi All,

in the below code how can I concatenate joined Residents of Table_2 and Table_3 with Table_1? When I leave it as it is now values from Resident Table_3 won't joined.

Table_1:

SELECT Dim_1, Dim_2, Dim_3 FROM Table_1

Table_2:

SELECT Dim_1. Dim_2 FROM Table_2

Table_3:

SELECT Dim_1, Dim_3 FROM Table_3

Conctenate(Table_1)

LOAD Dim_1, Dim_2 FROM Resident Table_2 Left Join (Table_2) LOAD Dim_1, Dim_3 FROM Resident Table_3

DROP TABLES Table_2, Table_3;

Regards,

Przemek

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You can't do both a join and a concatenation in one statement.

Try the following instead:

TempTable:

LOAD Dim_1, Dim_2 Resident Table_2;

Left Join LOAD Dim_1, Dim_3 Resident Table_3;

Conctenate(Table_1)

LOAD * Resident TempTable;

DROP TABLES Table_2, Table_3, TempTable;

View solution in original post

2 Replies
hic
Former Employee
Former Employee

You can't do both a join and a concatenation in one statement.

Try the following instead:

TempTable:

LOAD Dim_1, Dim_2 Resident Table_2;

Left Join LOAD Dim_1, Dim_3 Resident Table_3;

Conctenate(Table_1)

LOAD * Resident TempTable;

DROP TABLES Table_2, Table_3, TempTable;

Not applicable
Author

I did the job, thank you Henric.