Sorry I had another issue that caused my test to fail. I can confirm that 
double quoting (two single quotes) work to get a single quote.

Cheers


From: "Zahner Josef, GSB-LR-TRW-LI" <josef.zahn...@swisscom.com>
Date: Thursday, 6 May 2021 at 09:40
To: "users@nifi.apache.org" <users@nifi.apache.org>
Subject: NiFi QueryRecord Escape Single Quote in string

Hi guys

We would like to insert a string as a column with the QueryRecord which 
includes a single quote, please check my example below.

SELECT 'Can't create a text with single quote' AS message
FROM FLOWFILE

The yellow marked single quote generates a syntax error and I don’t know how to 
fix it. Surrounding double quotes doesn’t seem to work as in regular SQL. I 
tried the following with no luck:

  *   \\’
  *   \’
  *   ‘’ (Double up the single quote)

Any help would be appreciated.

Cheers Josef


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to