Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Specialist
Specialist

Try this

[Your table]:

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

LOAD Names

FROM Your file;

View solution in original post

3 Replies
swarup_malli
Specialist
Specialist

Try this

[Your table]:

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

LOAD Names

FROM Your file;

Clever_Anjos
Employee
Employee

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
Author

Thank you guys