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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Value of variable with single quote

Hi all,

now my problem is that I need to put in the value of a variable a name, and this name contains a single quote (example: John D'Oe). How can I do this?

Thank you in advance

Carlo A. Babini

1 Solution

Accepted Solutions
Not applicable
Author

Hi Carlo,

Try something like this after you define your variable -  'John D'&chr(39)&'Oe

Cheers

View solution in original post

3 Replies
Not applicable
Author

From the variable dialog, just enter as is.

From the load script the easiest way is to use set, e.g,

SET name=John D'Oe;

If you must use a LET stateement, use chr(39) function to create a single quote character, e.g.,

LET name='John D' & chr(39) & 'Oe';

Not applicable
Author

Hi Carlo,

Try something like this after you define your variable -  'John D'&chr(39)&'Oe

Cheers

Not applicable
Author

Ok, now I understand.

Thank you both