Reputation: 832
I have a following query. The goal of the query is to get all the nodes except certain nodes
MATCH (u:User)
WHERE NOT exists(u.canceled)
WITH u
MATCH (u1:User)
WHERE NOT exist(u.password) AND NOT u
RETURN u1
I got Type mismatch: expected Boolean but was Node Error.
How can i get all 'u1' nodes without 'u' nodes?
Upvotes: 3
Views: 2710
Reputation: 20185
The exception is for this line :
WHERE NOT exist(u.password) AND NOT u
especially the AND NOT u
If you want to say that u1 should not be the same node as u, then you should write the following :
WHERE NOT EXISTS(u.password)
AND u1 <> u
Upvotes: 3