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: 
avigdova
Contributor II
Contributor II

concatenating strings, commas and apostrophe into a string variable

Hi,

I am trying to concatenate these strings into a variable :  xxx and yyy and use it later in WHERE clause.

The variable value should look like this:   'xxx', 'yyy'

while typing this chr(39)&'xxx'&chr(39)&', '&chr(39)&'yyy'&chr(39)

I am getting that:  "'xxx', 'yyy'"

how to elimanete the two " in the start and end of the variable?

Labels (1)
1 Solution

Accepted Solutions
Mathumitha
Partner - Contributor III
Partner - Contributor III

vFirst='#xxx#'&','&'#yyy#'

vSecond=Replace('$(vFirst)','#',chr(39))

View solution in original post

2 Replies
Mathumitha
Partner - Contributor III
Partner - Contributor III

Hi @avigdova ,

 

You need to create 2 variables to handle this. 

vFirst=='#xxx#'&','&'#yyy#'

vSecond=Replace('$(vTest)','#',chr(39))

 

In the second variable, you'll get your expected output.

Mathumitha
Partner - Contributor III
Partner - Contributor III

vFirst='#xxx#'&','&'#yyy#'

vSecond=Replace('$(vFirst)','#',chr(39))