Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

concatenate rows and enclose them within single quotes

I have a name field

I want to concatenate all the names within single quotes

Ex : Name

       Sam

        John

       Adam

       Alex

I want the result to be

'Sam','John','Adam',' Alex'

Want it to be done in script not front end

Any ideas ?


1 Solution

Accepted Solutions
swarup_malli
Valued Contributor

Re: concatenate rows and enclose them within single quotes

Try this

[Your table]:

Load concat(CHR(39)&Names&CHR(39),',') as ResultNames;

LOAD Names

FROM Your file;

3 Replies
swarup_malli
Valued Contributor

Re: concatenate rows and enclose them within single quotes

Try this

[Your table]:

Load concat(CHR(39)&Names&CHR(39),',') as ResultNames;

LOAD Names

FROM Your file;

Employee
Employee

Re: concatenate rows and enclose them within single quotes

T:

LOAD * INLINE [

Name

Sam

John

Adam

Alex

];

LOAD chr(39) & Concat(Name,chr(39)&','& chr(39)) & chr(39) as value Resident T;

Not applicable

Re: concatenate rows and enclose them within single quotes

Thank you guys

Community Browser