Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-28-2020 06:45 PM
MATCH (m:Product)
REMOVE m.price
RETURN count(m) as count
Even if my Product nodes don't have the property 'price', it still returns the total number of product nodes. How can I return the count of nodes that have been affected by the REMOVE command? For example, if Product nodes don't have any 'price' property', it should return 0; if 100 product nodes have 'price' property while other product nodes don't have this property, it should return 350.
How to modify this query?
Solved! Go to Solution.
10-28-2020 10:50 PM
How about adding a where clause? something like
MATCH (m:Product)
WHERE EXISTS(m.price)
REMOVE m.price
....
however if you're using one of the drivers you can look at the query statistics to see counters.propertiesSet ( in the browser you can find it if you click the Code tab in the results pane )
10-28-2020 10:50 PM
How about adding a where clause? something like
MATCH (m:Product)
WHERE EXISTS(m.price)
REMOVE m.price
....
however if you're using one of the drivers you can look at the query statistics to see counters.propertiesSet ( in the browser you can find it if you click the Code tab in the results pane )
All the sessions of the conference are now available online