title: neo4j double UNWIND split
body: <p><br/>
  I Have the following .csv file <br/><br/></p>
  
  <pre><code>day,month,year,mps,party,subjectofquest,typeofquest,period,ministry&lt;br/&gt;
  "1","1","2012","mp1,mp2,mp3","party1","subject1","type1","1","ministry1,ministry2"
  </code></pre>
  
  <p>I try to split the mps AND ministry cells after Mark Needhams guidance (<a href="http://java.dzone.com/articles/neo4j-load-csv-processing" rel="nofollow">http://java.dzone.com/articles/neo4j-load-csv-processing</a>)<br/>
  Each one of them can be done as standalone commands, but I cant figure how to it compined (after so much effort...)<br/>
  The code that do the job for the mp cell is here:<br/></p>
  
  <pre><code>load csv with headers from " file:///test/MESA2.csv " AS row&lt;br/&gt;  
    WITH row, split(row.mps, ",") AS mps&lt;br/&gt;  
    UNWIND mps AS mpname  &lt;br/&gt; 
    MERGE (p1:Question {questsub:row.subjectofquest})&lt;br/&gt;
    MERGE (p2:MP {mpname: mpname})&lt;br/&gt;
    MERGE (p3:Ministry{questministry: row.ministry})&lt;br/&gt;
    MERGE (p2)-[:ASKS_MKE]-&gt;(p1)&lt;-[:REFERS]-(p3);&lt;br/&gt;
  </code></pre>
  
  <p>And i tried several syntaxes for the double UNWIND, here is one of the, but noone works: <br/><br/></p>
  
  <pre><code>load csv with headers from " file:///test/MESA2.csv " AS row &lt;br/&gt; 
    WITH row, split(row.mps, ",") AS mps &lt;br/&gt; 
    UNWIND mps AS mpname  &lt;br/&gt; 
    MERGE (p1:Question {questsub:row.subjectofquest})&lt;br/&gt;
    MERGE (p2:MP {mpname: mpname})&lt;br/&gt;
    MERGE (p2)-[:ASKS_MKE]-&gt;(p1)&lt;br/&gt;
    WITH row, split(row.ministry, ",") AS ypourgeio &lt;br/&gt; 
    UNWIND ypourgeio AS ypourgeio1&lt;br/&gt;
    MERGE (p3:Ypname{ypourgeio: ypourgeio}) &lt;br/&gt;
    MERGE (p1)-[:REFERS]-&gt;(p3)&lt;br/&gt;
  </code></pre>
  
  <p>Please help(I think I can split in excel through VB but its gonna be terrible!)<br/>
  Thank you in advance!<br/>
  Nektarios</p>