NEO4J从csv创建语句长字符串

时间:2014-04-01 14:19:51

标签: neo4j cypher

请不要理解为什么这句话一个接一个,但如果我粘贴所有项目并运行

就会失败
"CREATE (n:shakspeare {name:""KING HENRY IV - 1"" , description:""KING HENRY IV ...""})"

"CREATE (n:shakspeare {name:""WESTMORELAND -1"" , description:""My liege, this haste was hot in question,...""})"

"CREATE (n:shakspeare {name:""KING HENRY IV - 2"" , description:""It seems ....""})"
"CREATE (n:shakspeare {name:""WESTMORELAND -2"" , description:""This match'd with....""})"

感谢您的帮助

布鲁诺

2 个答案:

答案 0 :(得分:1)

您正在重新声明“' n'每个CREATE语句中的变量。您需要在每个CREATE中声明不同的名称。

答案 1 :(得分:1)

这些应该有效:

CREATE (henry:Play {name:"KING HENRY IV - 1" , description:"KING HENRY IV ..."})
CREATE (westmoreland:Play {name:"WESTMORELAND -1" , description:"My liege, this haste was hot in question,..."})

CREATE (henry2:Play {name:"KING HENRY IV - 2" , description:"It seems ...."})
CREATE (westmoreland2:Pay {name:"WESTMORELAND -2" , description:"This match'd with...."})

我可能不会将它们标记为:Shakespeare,而是使用:Play并将它们连接到:Author

name:"Shakespeare"节点

查看免费图表数据库书籍,了解威廉·莎士比亚戏剧的章节。