I made a mistake incompatible with attribute types. For human nodes, some have a string for the external_id property, and some have an int. I would like to remove all nodes where the property is a string. The following query is executed and seems to give the correct answer.
MATCH (n:person) WHERE TOSTRING(n.external_id) = n.external_id RETURN count(n)
However, when I try to delete these 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 it looks like this should be pretty simple. I have already deleted all relationships for these nodes. What am I missing here?
source share