Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner
Partner

store load result into variable

Hello,

I am trying to store all the previous load result into a variable. Peek() is not working for my scenario because I want al the result in variable. I don't want to use where exists because I will be using the same variable for many loads. How can I achieve this.

Thanks


table1:
LOAD * Inline [
fields
1
2
3
4]
;

let vMyTableName = peek('fields',0,'table1');

table2:
LOAD home
FROM
(
ooxml, embedded labels, table is Sheet1) where home = '$(vMyTableName)';

1 Solution

Accepted Solutions
settu_periasamy

May be try this..

table1:
LOAD Concat(chr(39)&fields&chr(39),',') as fields;
LOAD * Inline [
fields
1
a
3
c]
;

let vMyTableName = peek('fields',0,'table1');
DROP Table table1;

table2:
LOAD * INLINE [
Dim
1
2
3
4
5
a
b
c
]
Where Match(Dim,$(vMyTableName));

View solution in original post

4 Replies
vinieme12
Champion II
Champion II

try without quotes, single quotes is use for comparing strings

table1:
LOAD * Inline [
fields
1
2
3
4]
;

let vMyTableName = peek('fields',0,'table1');


table2:
LOAD home
FROM
(
ooxml, embedded labels, table is Sheet1) where home = $(vMyTableName);

didierodayo
Partner
Partner
Author

I have.  The problem is that I want to store all the values from table1 into the variable.  Not just 1 value.

In my case table 1 could have both numbers and string.

Thanks

settu_periasamy

May be try this..

table1:
LOAD Concat(chr(39)&fields&chr(39),',') as fields;
LOAD * Inline [
fields
1
a
3
c]
;

let vMyTableName = peek('fields',0,'table1');
DROP Table table1;

table2:
LOAD * INLINE [
Dim
1
2
3
4
5
a
b
c
]
Where Match(Dim,$(vMyTableName));

View solution in original post

didierodayo
Partner
Partner
Author

Thanks Settu it worked.