Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set a string variable that include both single code and double code

Hi,

I know that Qlikview can use both single code and a double code for a declaring a string. Bu what if I need to declare a string with both single and double code as part of the string.

For Example:

Following is the string:

I said "Don't go to there again!"

I need to define a string that store the whole line. What can  I do?

Thanks !

Elim

1 Solution

Accepted Solutions
kaushiknsolanki

Hi,

Try this code.

Way1:

Load * inline [

Data

I said "Don't go to there again!"

];

Way2:

Load '"I said '&'Don'&Chr(39)& 't go to There Again!"' as Field

AutoGenerate 1;

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

3 Replies
kaushiknsolanki

Hi,

Try this code.

Way1:

Load * inline [

Data

I said "Don't go to there again!"

];

Way2:

Load '"I said '&'Don'&Chr(39)& 't go to There Again!"' as Field

AutoGenerate 1;

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

vinieme12
Champion II
Champion II

You would be using the ASCII codes for those literals

example

vString  ='I said'&chr(34)&'Don'&chr(39)&'t go to there again!'&chr(34)

maxgro
MVP
MVP

A different solution could be

SET vSingleAndDoubleQuote = [aaa ' bbb " ccc];

Here you can read the explanation

Escape sequences