Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.
Contributor II

How to qualify a String?

Hi all,

i have a string field, let's assume 'Name':

Name         Age

Tobias      20

Richard     23

i wnat to use the concatenated Names in FOR...EACH...NEXT control.

my code looks like :

LOAD concat( Name , ',' ) as conNames

FROM ......

LET ConNames = Peek( 'conNames' );

result is :


but this doesn't work in FOR...EACH. i need something like:


i tried :

LOAD concat( '''' & Name & '''' , ',' ) as conNames

but it doesn't work and i get error when runing script. i need a way to qualify the string value of Name with '.

Thank you all

4 Replies

How to qualify a String?


     Try using Chr() function like below


LOAD chr(39) & concat( Name , Chr(39)& ','  chr(39)) & chr(39) as conNames

FROM ......


Contributor II

Re: How to qualify a String?

thank you so much for advise,

i think the answer is :

LOAD concat( chr(39) & Name & Chr(39) , ',' ) as conNames

Re: How to qualify a String?


     Yes.You can use like that also.


Re: How to qualify a String?


Even when the expression editor does not recognize the Chr() after the comma as second parameter, is likewise valid, and the following expression should work in any object or variable:

LOAD Chr(39) & Concat(Name, Chr(39) & Chr(44) & Chr(39)) & Chr(39) AS conNames

conNames should store now something like


Hope that helps.


Community Browser