Head's Up! Site migration is underway. Phase 2: migrate recent content
β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:41 AM
Neo4j Browser version: 3.2.20
Neo4j Server version: 3.5.8 (community)
β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