我的产品包含我想在批处理操作中更新的日期。 这是我正在使用的密码的一部分,它不起作用:
match (p { Date:9102013 }) set p.Date = '9/10/2013' with p
match (p { Date:9302013 }) set p.Date = '9/30/2013' with p
match (p { Date:1092013 }) set p.Date = '1/0/2013' with p
match (p { Date:1292013 }) set p.Date = '1/2/2013' with p
match (p { Date:6182013 }) set p.Date = '6/18/2013' with p
match (p { Date:9202013 }) set p.Date = '9/20/2013' with p
match (p { Date:4262013 }) set p.Date = '4/26/2013' with p
match (p { Date:4162013 }) set p.Date = '4/16/2013' with p
match (p { Date:1142013 }) set p.Date = '1/1/2013' with p
match (p { Date:9252013 }) set p.Date = '9/25/2013' with p
match (p { Date:1151900 }) set p.Date = '1/1/1900' with p
match (p { Date:4112013 }) set p.Date = '4/11/2013' with p
match (p { Date:1242013 }) set p.Date = '1/2/2013' with p
match (p { Date:10142013 }) set p.Date = '10/14/2013' with p
match (p { Date:5202013 }) set p.Date = '5/20/2013' with p
match (p { Date:212013 }) set p.Date = '2/12/2013' with p
match (p { Date:10292013 }) set p.Date = '10/29/2013' with p
match (p { Date:262013 }) set p.Date = '2/6/2013' with p
match (p { Date:10242013 }) set p.Date = '10/24/2013' with p
match (p { Date:312013 }) set p.Date = '3/12/2013' with p
match (p { Date:5102013 }) set p.Date = '5/10/2013' with p
match (p { Date:2282013 }) set p.Date = '2/28/2013' with p
match (p { Date:5302013 }) set p.Date = '5/30/2013' with p
match (p { Date:5152013 }) set p.Date = '5/15/2013' with p
match (p { Date:362013 }) set p.Date = '3/6/2013' return p;**
答案 0 :(得分:2)
您提供的示例是单个Cypher语句。在这种情况下,第一个匹配项将设置标识符p
以匹配Date
= 9102013
(如果有)的任何节点。 1}}已经绑定了随后的匹配语句,因此无法匹配任何内容。
您应该将其修改为多个单独的查询,并使用Neo4j批处理API(http://docs.neo4j.org/chunked/stable/rest-api-transactional.html)将它们全部作为单独的密码语句发送。
例如(只有前3个),你会:
p
请注意,我还添加了参数使用,因为它更快。