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

add a empty field in load script

HI. 

 I want to add an empty column in load script. 

I have my visualization with column name called as CITY. But the table extracted from database doesn't have the field CITY. How can i add the column name CITY in load script. 

I tried doing

abc:

load 

..

..

..

..

;

table1:

load *, 

'city' as [CITY];

resident abc;

drop table table1; 

 

I am new to qliksense. Do help. 

Labels (1)
1 Solution

Accepted Solutions
nikolay_dolgono
Partner - Contributor II
Partner - Contributor II

Hello, @qlikuser22 !

Quite a common situation.

Try to use Resident (as in your example), Concatenate or Join instruction

1) Resident

[tmp]: 

Load * From ... ;

 

[result]: 

NoConcatenate

Load *, Null() as [City]

Resident [tmp];

Drop table [tmp];

 

2) Concatenate

[result]: 

Load * From ... ;

 

Concatenate([result])

Load * Inline [City];

 

3) Join

[result]: 

Load * From ... ;

 

Left Join([result])

Load * Inline [City];

 

View solution in original post

3 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @qlikuser22, I wonder why if you do not have City field you want to show it in a visualization. I think it is easier to remove that field from your chart.

JG

nikolay_dolgono
Partner - Contributor II
Partner - Contributor II

Hello, @qlikuser22 !

Quite a common situation.

Try to use Resident (as in your example), Concatenate or Join instruction

1) Resident

[tmp]: 

Load * From ... ;

 

[result]: 

NoConcatenate

Load *, Null() as [City]

Resident [tmp];

Drop table [tmp];

 

2) Concatenate

[result]: 

Load * From ... ;

 

Concatenate([result])

Load * Inline [City];

 

3) Join

[result]: 

Load * From ... ;

 

Left Join([result])

Load * Inline [City];

 

qlikuser22
Creator II
Creator II
Author

Thanks @nikolay_dolgono . The option 2, concatenate worked out and solved my issue. Thanks a lot!