Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-30-2022 09:28 AM
Let's say I have 50 person nodes and I set a new property like p.countryBorn = 'USA' for all. Later I notice 10 of person nodes actually are wrong and I need to update p.countryBorn value to 'Scotland'. How can I do that at once? I mean, I know p.name of 10 nodes, but I'm able to change one by one. Is it possible to set for 10 nodes at once?
tks,
Darcio
11-30-2022 10:08 AM
Try this:
with ["name1", "name2", "name3", "name4", "name5", "name6", "name7", "name8", "name9","name10"] as pnames
MATCH (p:Person)
where p.name in pnames
//check to see if this shows all the correct nodes
return p
//
//If results looks good...
set p.countryBorn = "Scotland"
11-30-2022 10:16 AM
Tks! It is working!
All the sessions of the conference are now available online