Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-02-2022 01:32 AM
I want to calculate the distance of the property-modified node from the specific labeled node ,and then set the distance as a property of the specific labeled node
So I use the clause WITH to transmmit the variety distance ,but the error appeared.
I took the screenshot as below:
Solved! Go to Solution.
05-02-2022 03:09 AM
Your code.
with node,m
with sqrt((m.x-node.x)^2+(m.y-node.y)^2) as distance
with m,distance
m is needed in the "with sqrt" line.
with node,m
with sqrt((m.x-node.x)^2+(m.y-node.y)^2) as distance, m
with m,distance
I think it can be written in just one line.
with sqrt((m.x-node.x)^2+(m.y-node.y)^2) as distance, m
05-02-2022 03:09 AM
Your code.
with node,m
with sqrt((m.x-node.x)^2+(m.y-node.y)^2) as distance
with m,distance
m is needed in the "with sqrt" line.
with node,m
with sqrt((m.x-node.x)^2+(m.y-node.y)^2) as distance, m
with m,distance
I think it can be written in just one line.
with sqrt((m.x-node.x)^2+(m.y-node.y)^2) as distance, m
05-02-2022 07:09 PM
Thank you for the reply!
From your answer ,I undersood the usage of the WITH
05-02-2022 05:35 AM
//Line 5 to 8 can be replaced by
SET m.distance = sqrt((m.x-node.x)^2+(m.y-node.y)^2)
05-02-2022 07:10 PM
Thank you It's simpler and works~
05-03-2022 06:52 PM
Hi, bro, I have another question for help
Does the APOC.trigger could be modified?
Everytime I modify the trigger,I have to remove the existed apoc.trigger and add a new one...
It's little bored and troublesome to do this repeatable prosedure
Is there any way to modify the old one or by any other easier way to do that? It bothers me a lot recently...
All the sessions of the conference are now available online