Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-22-2021 08:24 AM
I have a scenario where I need to make 2 separate passes through a node and extract a Jira ID to create another node and relationship. The first pass seems to work but making the second pass doesn't pickup all of the information. For example
MATCH (o:OS) WHERE o.Jira_ID_1 <> "na"
MERGE (j:JIRA {Jira_ID: o.Jira_ID})
MERGE (o)-[:HAS]->(j)
MATCH (o:OS) WHERE o.Jira_ID_2 <> "na"
MERGE (j:JIRA {Jira_ID: o.Jira_ID})
MERGE (o)-[:HAS]->(j)
RETURN o, j;
If I use a "WITH (o) for the second pass, it doesn't catch all of the tickets. Any ideas how to do this in one script? An entry may have 0, 1 or 2 Jira tickets in it. If I run this as 2 separate scripts it extracts the data just fine.
Solved! Go to Solution.
07-22-2021 08:51 AM
Okay, I figured out if you add a semicolon after the first pass, it treats the 2 as separate and can run in a single pass.
07-22-2021 08:51 AM
Okay, I figured out if you add a semicolon after the first pass, it treats the 2 as separate and can run in a single pass.
All the sessions of the conference are now available online