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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
lucarizziero
Partner - Contributor III
Partner - Contributor III

CALL SUB with a string parameter

Hi all,

I need to pass to a sub a parameter string containing a ' character

I have a sub executing the SQLSelect instruction to which I need to pass the where condition: for example

CALL runSQL(' zipcode like '%555%' ')

Is it possible to mask the ' character ?

Thanks

2 Replies
Not applicable

Hi Luca,

Try this:

Let mySQLWhereClause = chr(39) & 'zipcode like ' & chr(39) & '%555%' & chr(39) & chr(39);

//= 'zipcode like '%555%''

call mySQL (mySQLWhereClause);

Unless your DBMS requires it, you probably wont need the first and last chr(39)s.

-QB



boorgura
Specialist
Specialist

Try using chr(39) instead of a single quote.