Hi,
I've two types of nodes *Gender* and *Activity*
Gender will be male or female
Activity node will contain fields *activity* and *count*
where there will be *n no of activity* fields with *n no of counts*
For eg:
activity = Activity1
count = Count1
activity = Activity1
count = Count2
.
.
and so on till n
activity = Activity2
count = Count1
activity = Activity2
count = Count2
.
.
and so on till n
I want to connect *Gender to Activity* with *Activity1..... Activity n* if
it is not connected or we will update the relation if the count has been
changed.
For eg
if Gender is connected to Activity with following fields
activity = Activity1
count = Count1
activity = Activity2
count = Count1
Now I have to replace the relation as count has changed as follows
activity = Activity1
count = Count2
activity = Activity2
count = Count2
For the above scenario please help me to modify the following query:
START gender=node({genderNodeNo}), activity=node({activityNodeNo})
MATCH (gender)-[oldRelation:HAS_ACTIVITY]->()
DELETE oldRelation WITH DISTINCT gender, activity
CREATE gender-[newRelation:HAS_ACTIVITY]->activity
RETURN activity, newRelation
-Sukaant Chaudhary
<http://in.linkedin.com/pub/sukaant-chaudhary/33/ba8/479>
--
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.