Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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