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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
sfbi
Creator
Creator

Add double quote to string/substring

Hi,

How do I add double quotes to each word into a string. 

vSelectFields = '  IDFIELD,     NMFIELD,     DTFIELD  '

TO
vSelectFields = ' "IDFIELD",     "NMFIELD",    "DTFIELD" ' 

Thank you,
Henrique

Labels (2)
2 Solutions

Accepted Solutions
Taoufiq_Zarra
MVP
MVP

one option :

='"'&replace(vSelectFields,',','","')&'"'

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

sfbi
Creator
Creator
Author

@Taoufiq_Zarra 

Thank you! I've just made some minor changes to get the spaces between each field...

='"'&replace(vSELECT,', ','", "')&'"';

 

View solution in original post

3 Replies
Or
MVP
MVP

[Edit]: Misunderstood the question, deleting the post

Taoufiq_Zarra
MVP
MVP

one option :

='"'&replace(vSelectFields,',','","')&'"'

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
sfbi
Creator
Creator
Author

@Taoufiq_Zarra 

Thank you! I've just made some minor changes to get the spaces between each field...

='"'&replace(vSELECT,', ','", "')&'"';