Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ronaldwang
Creator III
Creator III

replace load script to replace some character with single quote '

Since there is some data issue i need to use replace function in my load script to replace some special character to single quote. so ideally the function will look like replace(A,'B','C') which works fine but replace(A,'B',''') where i want to replace B with ' then there will be issue as i think Qlik confuse with ' and ''? any idea to solve the issue?

1 Solution

Accepted Solutions
MayilVahanan

Hi @ronaldwang 

Try like this

=replace(A,'B',Chr(39))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

Hi @ronaldwang 

Try like this

=replace(A,'B',Chr(39))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Code two single quotes to represent quote as a literal. So in your case, 4 single quotes and it will work. 

replace(A,'B','''')

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

ronaldwang
Creator III
Creator III
Author

Both work perfectly, thank you