neo4j - How to MATCH and CREATE a node and relationship? -


learning neo4j , need getting basics right. trying find matching candidate create company , create relationship between candidate , newly created company. so, query is

match (b:candidate {name:'bala'}), create (e:employer {name:'yahoo'}), create (b)-[:worked_in]->(e) return b,e;  invalid input '(': expected whitespace, comment, '=', node labels, mapliteral, parameter, relationship pattern, ',', using, where, load csv, start, match, unwind, merge, create, set, delete, remove, foreach, with, return, union, ';' or end of input... 

i using 2.2.5 console.

remove 2 commas before create. clauses in cypher not comma separated, elements within clause are. query read

match (b:candidate {name:'bala'}) create (e:employer {name:'yahoo'}) create (b)-[:worked_in]->(e)  return b,e; 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -