skandagn
(Skanda Gurunathan R)
1
Hi,
I want to do the following
Match n:Node WHERE n.someprop = somevalue
Match m:ANode WHERE ID(m)=21
Create relationship for all n nodes with m
How can I achieve it with a single cypher? Is FOREACH is an effective way to do it? Or someother way is there to do it.
Thanks,
Skanda
Bennu
(Harold Agudelo)
2
Hi,
You can try
Match m:ANode WHERE ID(m)=21
with m
Match n:Node WHERE n.someprop = somevalue
CREATE (m)-[:REL]->(n)
Bennu
skandagn
(Skanda Gurunathan R)
3
Thanks Bennu, Just now myself found the same!