我必须使用istat标签在节点和所有节点之间创建关系;因此尝试了以下查询:START MATCH (i:istat), c = node(21519) FOREACH(i|CREATE UNIQUE (c)-[r:CAN_SEE]->(i);但是控制台给了我这个错误:
SyntaxException: Invalid input 'u': expected whitespace, comment, NodeLabel, MapLiteral, a parameter, a relationship pattern, '.', '[', "=~", IN, IS, '*', '/', '%', '^', '+', '-', '<', '>', "<=", ">=", '=', "<>", "!=", AND, XOR, OR or '|' (line 1, column 101)
==> "start c =node(21519) match(i:istat) with collect(i) as istat_code,n foreach(i in istat_code: create unique (n)-[r:CAN_SEE]->(i))"
==> ^发布于 2014-01-29 10:35:00
尝尝这个
START c=node(21519)
MATCH(i:istat) WITH c,collect(i) AS istat_code
FOREACH(t in istat_code | CREATE UNIQUE (c)-[r:CAN_SEE]->(t))https://stackoverflow.com/questions/21427620
复制相似问题