Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to manage Apostrophe in String

I have the following statement that throws an error. It's the apostophere in my match condition. I read some articles relatting to escape sequences from a previous question but I'm still having trouble. Can someone help with the syntax. I have tried using brackets instead of single quotes and tried other examples too.

TestTable:

LOAD

PKID,

REASON,

PROGRAM

FROM MAINTABLE

WHERE PROGRAM = 'CLOSED'

AND MATCH(REASON, 'Don't need')

1 Solution

Accepted Solutions
sunny_talwar

Try this:

TestTable:

LOAD

PKID,

REASON,

PROGRAM

FROM MAINTABLE

WHERE PROGRAM = 'CLOSED'

AND MATCH(REASON, 'Don''t need')

Note: the two single quotes '' (not a double quote)

View solution in original post

4 Replies
sunny_talwar

Try this:

TestTable:

LOAD

PKID,

REASON,

PROGRAM

FROM MAINTABLE

WHERE PROGRAM = 'CLOSED'

AND MATCH(REASON, 'Don''t need')

Note: the two single quotes '' (not a double quote)

swuehl
MVP
MVP

Well, that's what has been already suggested in the other thread , so I think it is not working for mrjohn123, right?

Though, seems to work for me:

Text:

LOAD *

WHERE Match(Reason,'Don''t need');

LOAD recno() as ID, * INLINE [

Reason

Don't need

Why not?

];

What error message do you get, mrjohn123?

Anonymous
Not applicable
Author

I was able to FINALLY resolve my issue. Once I identfied escape sequences and to use single quotes and not double quotes. I was also receiveing a "Grabage" In statment error that I resolved but closing the app out and logging back in. Thank you all for your help as I'm currently creating my 2nd app.

Anonymous
Not applicable
Author

I was using a double quote, thanks for the call out.