
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use quotation marks in the Qlik Sense Script
Hello together,
I´m using the following script:
test:
load * inline [
a1,a2
a, ' 'A' '
];
test2:
load
TextBetween(a2,''',''',1) as Wert
resident test;
Important: ' 'A' ' is not a double quotation mark, there are two single quotation marks and A and two single quotation marks.
The content of a2 is 'A'. Everything perfect!
When I try to extract A (without single quotation marks) from the variable a2 I use the function TextBetween.
The result of Wert is empty. Not perfect!
I tried this option:
test:
load * inline [
a1,a2
a, ' 'A' '
];
test2:
load
TextBetween(a2,"'","'",1) as Wert //double quotation + single quotation + double quotation
resident test;
When I change the script to.:
test:
load * inline [
a1,a2
a, ' *A* '
];
test2:
load
TextBetween(a2,'*','*',1) as Wert
resident test;
The content of Wert is A. Exactly what I need.
Now the question: how to use quotation marks if the value of the data-source contains single quotation marks like ' A'?
I used the information's published under:
Using quotation marks in the script ‒ Qlik Cloud
but without success.
Thank all.
Frank
- Tags:
- qlik sense
- quotation
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should work:
test:
load * inline [
a1,a2
a, ''A''
];
test2:
load TextBetween(a2,'''','''',1) as Wert resident test;
- Marcus


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As below
raw:
load a1,TextBetween(a2, chr(39), chr(39)) inline [
a1,a2
a, ''A''
];
OR why not just purgechar() ?
test:
load a1,purgechar(a2,chr(39)) inline [
a1,a2
a, ''A''
];
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answers. You gave me another idea. I´ll use replace ..
test:
load * inline [
a1,a2
a, ' 'A' '
];
test2:
load
TextBetween(replace(a2,chr(39),'*'),'*','*',1) as Wert
resident test;
Now is a2 = 'A' and Wert = A without quotation marks.
Thanks


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should work:
test:
load * inline [
a1,a2
a, ''A''
];
test2:
load TextBetween(a2,'''','''',1) as Wert resident test;
- Marcus


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As below
raw:
load a1,TextBetween(a2, chr(39), chr(39)) inline [
a1,a2
a, ''A''
];
OR why not just purgechar() ?
test:
load a1,purgechar(a2,chr(39)) inline [
a1,a2
a, ''A''
];
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answers. You gave me another idea. I´ll use replace ..
test:
load * inline [
a1,a2
a, ' 'A' '
];
test2:
load
TextBetween(replace(a2,chr(39),'*'),'*','*',1) as Wert
resident test;
Now is a2 = 'A' and Wert = A without quotation marks.
Thanks
