Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Load a list from a select statement to variable

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

2 Replies

Re: Load a list from a select statement to variable

Gil

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

Best Regards,     Bill

Re: Load a list from a select statement to variable

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

Community Browser