HI
I want to create a relationship if the node does not have this Relationship TYPE already: I tried
MATCH (node), (ac:account {name:'_ADMIN'})
WITH node,ac
WHERE NOT ((node)-[:owner_of]->(),
CREATE ((ac)-[:owner_of]->(node));
This gives me
Invalid input ';': expected whitespace, '.', node labels, '[', '^', '*', '/', '%', '+', '-', "=~", IN, STARTS, ENDS, CONTAINS, IS, '=', '~', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, ',' or ')' (line 5, column 34 (offset: 126))
"CREATE ((ac)-[:owner_of]->(node));"
I don't want this
MATCH (node), (ac:account {name:'_ADMIN'}) MERGE(ac)-[:owner_of]->(node);
this creates a relationship if the relationship between the 2 Nods is not exsiting- I need a check for the Relationship to any other node ...
THANKS rob