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.

SyntaxError at the p of Replace

Hello,
I am getting a really strange error and cant find a solution for it.
Neo.ClientError.Statement.SyntaxError

Invalid input 'P': expected 'm/M' or 't/T' (line 2, column 3 (offset: 2))

"REPLACE(ProductLocation._productionTypeId, 'CS-'','')"

My Code ist basically just:

MATCH(p:ProductLocation)
REPLACE(p._productionTypeId, "CS-","")
RETURN p LIMIT 1

It is really weird, Thank you for your help in advance
Nils

1 ACCEPTED SOLUTION

intouch_vivek
Graph Steward

Hi @nils.hahn

If your requirement is to update the property value then you need to set that
eg.
MATCH(p:ProductLocation)
set p._productionTypeId = REPLACE(p._productionTypeId, "CS-","")
RETURN p LIMIT 1

View solution in original post

2 REPLIES 2

intouch_vivek
Graph Steward

Hi @nils.hahn

If your requirement is to update the property value then you need to set that
eg.
MATCH(p:ProductLocation)
set p._productionTypeId = REPLACE(p._productionTypeId, "CS-","")
RETURN p LIMIT 1

Thanks a lot, that worked! Damn that I missed that.