Neo.ClientError.Statement.SyntaxError while loading data from Oracle DB

Hello Team,

I am getting below error while fetching the data from Oracle DB using Neo4j jdbc connection utility.

Below is my query written in Neo4j:

with "jdbc:oracle:thin:sqmread/Qwcbd4#g@10.147.161.47:1522/XCOMSTB2" as url
CALL apoc.load.jdbc(url,"select * from RJILCUSTOMISATIONS.RIL_UTM_SITE_DELTA_V where TRANSACTION_TYPE='\"DELETE\"'") YIELD row return row

Below is the error:

Neo.ClientError.Statement.SyntaxError: Invalid input 'D': expected whitespace, '.', node labels, '[', "=~", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', '~', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',' or ')' (line 2, column 108 (offset: 183))
"CALL apoc.load.jdbc(url,"select * from RJILCUSTOMISATIONS.RIL_UTM_SITE_DELTA_V where TRANSACTION_TYPE='\"DELETE\"'") YIELD row return row"

Below is the value in Oracle Database:

Please let me know how to solve this.

Best Regards
Akshat

In this part you seem to be double-escaping, and I can't tell what the right string should be, but almost certainly your error is caused by not closing the string correctly.

You don't need this double escaping, you can make it simpler like this:

CALL apoc.load.jdbc(url, 'select * from foo where bar="blizz"')

Notice how because I delimit the cypher string with a single quote, I can use the double quote inside of SQL

Hello Allen ,

Tried 2 different queries but not getting success:

Try 1:

Try 2:

Value in Database:

Best Regards
Akshat