Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-03-2022 09:25 AM
HI all,
I need to update this query so that its returns the start node and end node of every realtionships the below is returning and also some properties of those start and end nodes
Solved! Go to Solution.
08-05-2022 06:37 AM
You can use this
match p = (a:MatPlant)-[*0..20]->(b:MatPlant)
where b.matl_num='428en11201' and b.plnt_cd = 'US456789033'
unwind relationships(path) as r
return type(r), startNode(r).matl_num, endNode(r).plnt_cd
// or
match p = (a:MatPlant)-[*0..20]->(b:MatPlant)
where b.matl_num='428en11201' and b.plnt_cd = 'US456789033'
unwind relationships(path) as r
with r, startNode(r) as start, endNode(r) as end
return type(r), start { .* } as startProps, end {.*, .plnt_cd} as endProps
08-05-2022 06:37 AM
You can use this
match p = (a:MatPlant)-[*0..20]->(b:MatPlant)
where b.matl_num='428en11201' and b.plnt_cd = 'US456789033'
unwind relationships(path) as r
return type(r), startNode(r).matl_num, endNode(r).plnt_cd
// or
match p = (a:MatPlant)-[*0..20]->(b:MatPlant)
where b.matl_num='428en11201' and b.plnt_cd = 'US456789033'
unwind relationships(path) as r
with r, startNode(r) as start, endNode(r) as end
return type(r), start { .* } as startProps, end {.*, .plnt_cd} as endProps
All the sessions of the conference are now available online