with reduce(a="", n in nodes(mypath) |  a + "," +n.dn) as path
Return substring(path,1,length(path)-1)

Sent from mobile device

Am 12.07.2014 um 04:04 schrieb Wei <[email protected]>:

> Thanks a lot Michael!   This is really nice!
> 
> One little thing:
> 
> my node dn values are: ie etc yum.repo.d base, I like to build something like 
> this: etc/yum.repo/base, using / as seperator, but there should be NO leading 
> / and NO ending /.  can this be implemented?
> 
> Thanks again,
> Wei
> 
> On Friday, July 11, 2014 9:14:50 PM UTC-4, Michael Hunger wrote:
>> 
>> match mypath = (n:topsystem) -[*]-> (m:blade) 
>> return extract(n in nodes(mypath) | n.dn) 
>> 
>> provides you with a collection of the properties
>> 
>> return reduce(a="", n in nodes(mypath) |  a + "," +n.dn) 
>> 
>> with a string where the properties are comma separated
>> 
>> 
>> 
>> On Sat, Jul 12, 2014 at 1:49 AM, Wei <[email protected]> wrote:
>>> hi all,
>>> 
>>> in Neo4j, I am traversing from node n to node m by following child 
>>> relationship.  there are multiple nodes between node n and m.  each node 
>>> has a property called dn.  is it possible to concatenate all nodes' 
>>> property DN along the path in Cypher?  
>>> 
>>> my neo4j is community v2..1.2.  I am using cypher query like this to get 
>>> all the paths: match mypath = (n:topsystem) -[*]-> (m:blade) return mypath.
>>> 
>>> I like to get this done in Cypher!  
>>> 
>>> Thanks a lot,
>>> Wei
>>> -- 
>>> 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.

-- 
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