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: 
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

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

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,', ','", "')&'"';