Hi Sukant,

This is the problem:

SyntaxException: Question mark is no longer used for optional patterns -
use OPTIONAL MATCH instead (line 1, column 88)

The syntax for optional match has changed. Can you try changing your query
based on this page:

http://docs.neo4j.org/chunked/stable/query-optional-match.html

If anything on that page isn't clear please let us know and we can update
it.

Mark


On 2 January 2014 08:14, Sukaant Chaudhary <[email protected]>wrote:

> Hi,
> I used the following query but I'm getting the following exception:
>
> START a=node(2) MATCH (a)-[:PUBLISHED_BY]->(c)<-[:PUBLISHED_UNDER]-(b)
> WITH c MATCH (c)-[r?]-() DELETE c, r;
> ==> SyntaxException: Question mark is no longer used for optional patterns
> - use OPTIONAL MATCH instead (line 1, column 88)
> ==> "START a=node(2) MATCH
> (a)-[:PUBLISHED_BY]->(c)<-[:PUBLISHED_UNDER]-(b) WITH c MATCH (c)-[r?]-()
> DELETE c, r"
> ==>
> ^
>
> -Sukaant Chaudhary
>
>
> On Thu, Jan 2, 2014 at 1:06 PM, Luanne Coutinho <[email protected]
> > wrote:
>
>> Hi,
>> As Michael pointed out earlier, there is no need to do b=node(*),
>> c=node(*) since that is implied by your path.
>> Your delete looks fine, please specify what nodes you want to delete and
>> please also move this question to stackoverflow.
>>
>> Thanks!
>> Luanne
>>
>>
>> On Thu, Jan 2, 2014 at 12:40 PM, Sukaant Chaudhary <
>> [email protected]> wrote:
>>
>>> Hi,
>>> What changes I need to make in the following query to delete the nodes
>>> and the relation with that node?
>>>
>>> START a=node(2), b=node(*), c=node(*) MATCH (a)-[r:PUBLISHED_BY]->(c),
>>> (b)-[s:PUBLISHED_UNDER]->(c) DELETE r,s,c;
>>>
>>>
>>> -Sukaant Chaudhary
>>>
>>> --
>>> 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/groups/opt_out.
>>>
>>
>>  --
>> 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/groups/opt_out.
>>
>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to