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: 
Vasiliy_Beshentsev
Creator III
Creator III

How to set up string variable?

Hello again!

How to set string variable with " ?


set str1 = "PPP"LegsandHands"";


and this doen't work


How to set up correct?


I want to use this variable like - if (FieldX = $(str1),then,else)

Or this - ... & $(str1) & .... as FieldY

1 Solution

Accepted Solutions
girirajsinh
Creator III
Creator III

Try

Let str1 = "PPP"&Chr(34)&"LegsandHands"&Chr(34);

Update:


Let str1 = 'PPP'&Chr(34)&'LegsandHands'&Chr(34);

View solution in original post

7 Replies
girirajsinh
Creator III
Creator III

Try

Let str1 = "PPP"&Chr(34)&"LegsandHands"&Chr(34);

Update:


Let str1 = 'PPP'&Chr(34)&'LegsandHands'&Chr(34);

sunny_talwar

May with single quotes around the whole thing?

SET str1 = 'PPP"LegsandHands"';

Vasiliy_Beshentsev
Creator III
Creator III
Author

Guys, where to find all Chr to read ?

girirajsinh
Creator III
Creator III

Ord() function gives that

like Ord('-') or Ord('"')

Vasiliy_Beshentsev
Creator III
Creator III
Author

Thanks!

Vasiliy_Beshentsev
Creator III
Creator III
Author

This works too! And more short and beatiful! Thanks!