You don't have to delete them. MERGE is get-or-create and then you can use SET or ON CREATE SET or ON MATCH SET for additional properties.
You delete them by MATCH and then DELETE or DETACH DELETE On Thu, Dec 7, 2017 at 9:36 AM, Liping Huang <liping.huang2...@gmail.com> wrote: > Hi there, > > When I import the data with "LOAD CSV", how to delete the match nodes, > relationships and recreate them in one LOAD CSV statement? > > > USING PERIODIC COMMIT 50000 > LOAD CSV FROM 'file:///data.csv' AS row > MERGE (n: Node{ keyNo: row[0] }) > ON CREATE SET > n.key= row[1], > > ...... > ON MATCH SET > n.key= row[1], > > ...... > > > > Above statement can create new and update the existing nodes, but how to > delete the existing one and re-create it? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.