Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
polisetti
Creator II
Creator II

Chr(39) is giving double quotes in final output

Hi Everyone,

My requirement is to pull data only for few Markets and I don't want to hardcode the values in Where condition. So, I created a variable like below using Chr(39) which should populate single quote in output. However, I am observing double quotes in output.

My Code:

vVariableTest  = Chr(40)&Chr(39)&'M157'&chr(39)&Chr(44)&chr(39)&'M291'&chr(39)&Chr(44)&chr(39)&'M316'&chr(39)&Chr(44)&chr(39)&'M689'&chr(39)&Chr(41);

Required Output:

('M157','M291','M316','M689')

Current Output:

'(''M157'',''M291'',''M316'',''M689'')'

Thanks in Advance

Polisetti

1 Solution

Accepted Solutions
polisetti
Creator II
Creator II
Author

Hey everyone,

I am doing wrong when writing the Variable value in SQL query. It should be $(vVariableTest ) not '$(vVariableTest )' .

Now I am getting the values as expected.

Thank for your help!

Polisetti.

View solution in original post

4 Replies
avinashelite

I tried your code and its giving the right results for me ..

could you please share the sample app ??

adamdavi3s
Master
Master

On my version (v12) it is working absolutely fine

polisetti
Creator II
Creator II
Author

Just now I noticed that it is working fine when I am directly loading in QlikView file. But when I trying same in below procedure it is giving wrong output.

In QVD Generator, for SQL query I need to apply this where Condition. For the same, I created an include script file and created a variable as above and in Generator SQL query I written where condition as MARKET IN '$(vVariableTest )' which is giving double quotes when I am checking log files.

PS: I cannot share sample file for now, I will try to create one.

Regards,

Polisetti

polisetti
Creator II
Creator II
Author

Hey everyone,

I am doing wrong when writing the Variable value in SQL query. It should be $(vVariableTest ) not '$(vVariableTest )' .

Now I am getting the values as expected.

Thank for your help!

Polisetti.