cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Apoc.do.when Create Node With Special Characters In One Property

ameyasoft
Graph Maven
CALL apoc.do.when(x is null, 'MERGE (a:Test{name:"~!@#$%^&*()_+|}{\":?></.,\';][=-`" }) RETURN cs1 as cs11') yield value 
Throws error:
Failed to invoke procedure `apoc.do.when`: Caused by: org.neo4j.exceptions.SyntaxException: Invalid input '?' (line 1,....)

Same MERGE statement outside the Call works fine. Any way to fix this?

I can create the node w/o that property and set that property outside Call and it works.

I tried Neo4j versions up to 4.1 and matching APOC version

1 REPLY 1

Hello @ameyasoft

You must escape " which starts and ends the string I think?

Regards,
Cobra