I've made the mistake of being inconsistent with attribute types. For nodes of type "person", some have a string for the "external_id" property, and some have an int. I'd like to delete all nodes where the property is a string. The following query runs and seems to give a correct answer.
MATCH (n:person)
WHERE TOSTRING(n.external_id) = n.external_id
RETURN count(n)
However, when I try to delete those nodes using the following query, I get "Unknown identifier `n`.":
MATCH (n:person)
WHERE TOSTRING(n.external_id) = n.external_id
DELETE n
I'm new to Neo4j and Cypher, but this seems like it should be pretty straightforward. I've already deleted all of the relationships for these nodes. What am I missing here?
This is a duplicate of https://github.com/neo4j/neo4j/issues/5768 which was fixed by https://github.com/neo4j/neo4j/pull/5807
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With