I have a query to be executed in vertica database using tDBRow component. The query is like this ;
select col1,
col2,
regexp_replace(regexp_replace(nvl(EFFECTIVE_RES_REQ,RES_REQ),'\s'), '(.*)rusage\[([^\]]*)\bmem=\({0,1}([0-9]+([.]{1}[0-9]+){0,1})(.*)', '\3') AS MEM_REQ,
col4
from table1....
The third field in select has a regex expression which when i run on sql prompt of vertica database runs fine but with tDBRow it says error due to escape characters first with '\s' & '\'. In above i am using \s & \b and \ as escape characters.
I tried various combinations like replacing \ with \\ & \s with ' ' but then the output of 3rd column comes blank.
regexp_replace(regexp_replace(nvl(EFFECTIVE_RES_REQ,RES_REQ),' '), '(.*)rusage\\[([^\\]]*)\bmem=\\({0,1}([0-9]+([.]{1}[0-9]+){0,1})(.*)', '3') AS MEM_REQ,