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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a table field as a variable ?

Hi,

I just need to know if this is possible.

Once you write the load statement, can I add a where clause to assign a particular value to a variable ?

Example:

SET X= Load FieldValue resident tablename where Fieldvalue='Y';

1 Solution

Accepted Solutions
deepakk
Partner - Specialist III
Partner - Specialist III

hi Chinmay,

You can use it like

Load fieldValue from table where Fieldvaleu= 'Y';

let vtest = peek('Fieldvalue',0,'tablename');

I hope this helps.

View solution in original post

4 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi Chinmay,

You can use it like

Load fieldValue from table where Fieldvaleu= 'Y';

let vtest = peek('Fieldvalue',0,'tablename');

I hope this helps.

tresesco
MVP
MVP

i think you need something else, otherwise what you wrote is equivalent to

Set X='Y'; if you already know the value then, why not this ? if you are in a different situation, please explain a bi t.

Regards, tresesco

Not applicable
Author

Thanks a lot Deepak

Not applicable
Author

Hi,

I got this working and was trying to use this variable in the where clause but not able to do.

Example:

Load Statement;

let vtest = peek('Fieldvalue',0,'tablename');

Load Statement where Column=$(vtest);