JavS9029 Member since 2017 4 posts
StepChange Debt Charity
Posted: February 21, 2020
Last activity: February 21, 2020

Query runner - how to escape characters

we are using a postgres back end on 7.3 , I have a sample query used in query runner  which I can't get to work - 

select pxTimeCreated, pyMessageKey from pegadata.hst_sometable_work and pyMessageKey LIKE '[ABC%'

the error i get is: ** Unclosed character class near index 6 '[FCC%' ^

I have tried using the character wild card i.e.

and pyMessageKey LIKE '_ABC%'

- but this returns no results.

The following works but  can't use this due to performance reasons  

and pyMessageKey LIKE '%ABC%' 


so how do I escape the character '[' in a sql query execute in the query runner ??

(This is part of a query to assist in trouble shooting - so want to run the query via query runner - not a report of any kind ) 




Pega Platform 7.3.1 Low-Code App Development Dev/Designer Studio Financial Services System Architect
Share this page LinkedIn