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

load doesn't work on concatenated tables

Hello,

Below is a simplified version of my code. I am trying to load a field f1 from table1 and table2. I want to then concatenate the results from table2 to the results from table1. Then I want to add the field f2 to the combined table. The code below only adds the field f2 to Table1. f2 is not added to the results returned from Table2. Any help would be much appreciated. Thank you. 

load

f1+1 as f2

;

SQL

SELECT

f1

FROM Table1

CONCATENATE

SELECT

f1

FROM Table2

1 Solution

Accepted Solutions
sunny_talwar

I think you will have to resident load to do any manipulation to the concatenated tables. Preceding load won't work here because the concatenation is done after the preceding load is completed here:

Table1:

SQL

SELECT

f1

FROM Table1;

Concatenat (Table1)

SELECT

f1

FROM Table2;

FinalTable:

LOAD f1 + 1 as f2,

          f1

Resident Table1;

DROP Table Table1;

View solution in original post

4 Replies
sunny_talwar

I think you will have to resident load to do any manipulation to the concatenated tables. Preceding load won't work here because the concatenation is done after the preceding load is completed here:

Table1:

SQL

SELECT

f1

FROM Table1;

Concatenat (Table1)

SELECT

f1

FROM Table2;

FinalTable:

LOAD f1 + 1 as f2,

          f1

Resident Table1;

DROP Table Table1;

Anonymous
Not applicable
Author

Or:

Table:

load

f1,

f1+1 as f2

;

SQL

SELECT

f1

FROM Table1

CONCATENATE

load

f1,

f1+1 as f2

;

SELECT

f1

FROM Table2

vcanale
Partner - Creator II
Partner - Creator II

Temp_Tbl:

LOAD

f1;

SQL SELECT

f1

FROM Table1;

CONCATENATE (Temp_Tbl)

LOAD

f1

FROM Table2;

Table:

LOAD
     f1+1 as f2,
     f1
Resident Temp_Tbl;

Drop Table Temp_Tbl;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe this works?

LOAD f1+1 AS f2 ; // Preceding LOAD

SQL SELECT f1 FROM Table1

UNION

SELECT f1 FROM Table2 ;

UNION is the SQL keywork to perform a SQL concatenate. AFAIK CONCATENATE is a QlikView keyword.

Best,

Peter