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 a list from a select statement to variable

Hi.

I need to load a list to a var from a select.

For example:

Select distinct client_code

From sales

Output: 1,3,4,5

I need the var to have:

vClients = 1,3,4,5;

Thank You.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

This is one way to do it in your script. Note: Concat() is an aggregation function that cannot be used in a simple variable assignment.

See attachment.

Best,

Peter

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Gil

Use the Concat() function,  see the Qv Desktop Help for its syntax.

Best Regards,     Bill

Peter_Cammaert
Partner - Champion III
Partner - Champion III

This is one way to do it in your script. Note: Concat() is an aggregation function that cannot be used in a simple variable assignment.

See attachment.

Best,

Peter