If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Manipulate Cognos Escape Character (' to \)

Started by naveen10046, 09 Sep 2017 06:46:57 AM

Previous topic - Next topic

naveen10046

Hi Guys,

I have a scenario where a field value contains apostrophe (ex: parry's), we have recently migrated from DB2 to Cloudera Impala.
Cognos is adding escape character single quote in the value (parry''s) which worked fine in DB2 while Impala expects backslash as escape character (parry\'s).

Any idea how to achieve this?


Thanks,
Naveen

the6campbells

Cloudera appears to have aligned with SQL standard/vendors in general in their more recent releases of Impala

https://www.cloudera.com/documentation/enterprise/5-8-x/topics/impala_literals.html#string_literals

To include a single quotation character within a string value, enclose the literal with either single or double quotation marks, and optionally escape the single quote as a \' sequence. Earlier releases required escaping a single quote inside double quotes. Continue using escape sequences in this case if you also need to run your SQL code on older versions of Impala.