Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
Tobias,Richard
but this doesn't work in FOR...EACH. i need something like:
'Tobias','Richard'
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
Hi,
Try using Chr() function like below
LOAD chr(39) & concat( Name , Chr(39)& ',' chr(39)) & chr(39) as conNames
FROM ......
Celambarasan
thank you so much for advise,
i think the answer is :
LOAD concat( chr(39) & Name & Chr(39) , ',' ) as conNames
Hi,
Yes.You can use like that also.
Celambarasan
Hi,
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
'Peter','Mike','Anthony'
Hope that helps.
Miguel