As I answered on SO, you have Neo4j 1.7

Updating queries were added in 1.8

Please update your install to the latest stable and try again (2.0.2)


On Mon, Apr 21, 2014 at 1:28 PM, Abhishek Singh <
[email protected]> wrote:

> I want to delete Relationship between two node my graphical database as:
> Abhi-(Memberof)->computer,Abhi-(Memberof)->Java and
> Abhi-(Memberof)->English like that, means one node have same relationship
> with different node now i want to delete specific relationship between node
> like Abhi-(Memberof)->computer from java,
> i use cypher query ExecutionResult result = engine.execute( "START
> n=node(*) MATCH n-[rel:MEMBERoF]->r WHERE (AND n.name='Abhi' AND 
> r.name='ComputerScience')
> delete rel" ); but it gives error as follows:
> Exception in thread "main" expected return clause
> "Start n= node(*) delete n"
> ^
> at
> org.neo4j.cypher.internal.parser.v1_7.CypherParserImpl.parse(CypherParserImpl.scala:66)
> at org.neo4j.cypher.CypherParser.parse(CypherParser.scala:44)
> at
> org.neo4j.cypher.ExecutionEngine$$anonfun$prepare$1.apply(ExecutionEngine.scala:61)
> at
> org.neo4j.cypher.ExecutionEngine$$anonfun$prepare$1.apply(ExecutionEngine.scala:61)
> at org.neo4j.cypher.internal.LRUCache.getOrElseUpdate(LRUCache.scala:31)
> at org.neo4j.cypher.ExecutionEngine.prepare(ExecutionEngine.scala:61)
> at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
> at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:52)
> at
> org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:63)
> but the same code working fine when i use return command as
> ExecutionResult result = engine.execute( "START n=node(*) MATCH
> n-[rel:MEMBERoF]->r WHERE (AND n.name='Abhi' AND r.name='ComputerScience')
> return rel" );
> Please reply me how can i delete relationship using java programming.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to