Closed zzl221000 closed 4 years ago
The syntax should be ANY (x in array[] WHERE x = expr); IE the 'where' is inside the ANY() Please include code snippet.
expression operator ANY (array expression)
match (n:rlnode {rlid:'bd2ef4ac89b0a4eea63bac9507c633f9'} )-[e:knows]-(:rlnode) WHERE to_jsonb(id(e)) = any(array['6.545450570']) RETURN e;
return
ERROR: syntax error at or near "array" LINE 2: ...[e:knows]-(:rlnode) WHERE to_jsonb(id(e)) = any(array['6.5...
expression IN (value [, ...])
match (n:rlnode {rlid:'bd2ef4ac89b0a4eea63bac9507c633f9'} )-[e:knows]-(:rlnode) WHERE to_jsonb(id(e)) in ('6.545450570','6.545450570') RETURN e;
return
ERROR: syntax error at or near "," LINE 2: ...:rlnode) WHERE to_jsonb(id(e)) in ('6.545450570','6.545450...
but use where in ('6.545450570')
no error
@joefagan
MATCH (n:r1node {r1id:'b...'})-[e:knows]->(:r1node)
WHERE ANY(x IN [6.1, 6.2] WHERE id(e)=x)
RETURN e;
Thanks @erik-overdahl
In my business, I get a batch of wrong edge ids based on criteria, I want to delete them in bulk. However, any(array[]) prompts me that there is an error. Is there any other way?