title: WITH is required between MERGE and MATCH (line 4, column 1 (offset: 63))
body: <p>I am trying to use CYPHER to create a simple graph on NEO4J. </p>
  
  <p>Below is the query:</p>
  
  <pre><code>MERGE (nut:asset{name:'nut'})
  MERGE (bolt:asset{name:'bolt'})
  
  MATCH (nut:asset)
  WITH nut,bolt
  MERGE (nut:asset)-[:hasPart]-&gt;(washer:asset{name:'washer',domain:'tool'})
  </code></pre>
  
  <p>Its throws me an error</p>
  
  <pre><code>WITH is required between MERGE and MATCH (line 4, column 1 (offset: 63))
  "MATCH (nut:asset)"
   ^
  </code></pre>
  
  <p>When I try to change my query to </p>
  
  <pre><code>MERGE (nut:asset{name:'nut'})
  MERGE (bolt:asset{name:'bolt'})
  
  MERGE (nut:asset)-[:hasPart]-&gt;(washer:asset{name:'washer',domain:'tool'})
  </code></pre>
  
  <p>Its says </p>
  
  <pre><code>Can't create node `nut` with labels or properties here. The variable is already declared in this context
  </code></pre>
  
  <p>How to use the MERGE statement in this context. I have used the tutorial from Neo4j <a href="http://neo4j.com/docs/developer-manual/current/cypher/clauses/merge/" rel="nofollow noreferrer">link</a> to construct my query.</p>