Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-15-2021 01:14 AM
Hi
With this query I'm getting this error
MATCH (o:Order)-[cont:CONTAINS]->(p:Product)-[r:PART_OF]->(c:Category)
where EXISTS {
(MATCH (:Supplier)-[:SUPPLIES]->(p))}
RETURN p.productName,cont.unitPrice;
Neo.ClientError.Statement.SyntaxError
Neo.ClientError.Statement.SyntaxError: Invalid input ':': expected whitespace, DISTINCT, an expression or ')' (line 3, column 9 (offset: 94))
" MATCH (:Supplier)-[:SUPPLIES]->(p))"
^
Any help?
Regards
Solved! Go to Solution.
12-15-2021 03:00 AM
12-15-2021 01:59 AM
It's the extra set of ( )
inside of the EXISTS
that is causing an error. The open parenthesis (
introduces an expression but MATCH
is a clause.
Instead, try:
MATCH (o:Order)-[cont:CONTAINS]->(p:Product)-[r:PART_OF]->(c:Category)
where EXISTS {
MATCH (:Supplier)-[:SUPPLIES]->(p)
}
RETURN p.productName,cont.unitPrice
Best,
ABK
12-15-2021 02:22 AM
Still getting the error
12-15-2021 02:32 AM
Which version of Neo4j database do you use?
12-15-2021 02:50 AM
This version of Neo4j doesn't support this syntax, you will have tu upgrade to the 4.0 at least to use it.
12-15-2021 02:52 AM
Hi.
I think what happens with CALL error is the same for this version.
12-15-2021 03:00 AM
Yes, subqueries have appeared with 4.0.
12-15-2021 03:09 AM
Many thanks for your help!
All the sessions of the conference are now available online