cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot delete a node with a specific property that its null

Mariana
Node Clone

Hello,

I have a problem with the node XmlWord11. The text property, in some nodes, is empty and I would like to delete it. 

1.PNG

I try this code and you can see it, it works when I put something between de '', in orange.

Capturar.PNG

I tried to put n.text= null and n.text='' but didn't work either way.

How do I do it?

Thank you!

 

1 ACCEPTED SOLUTION

bennu_neo
Neo4j
Neo4j

Hi @Mariana ,

You may have some \r lost in the middle. Try something like:

 

 

MATCH (n:XmlWord11) 
where trim(n.text) = ""
detach delete n 

 

 

 

Oh, y’all wanted a twist, ey?

View solution in original post

2 REPLIES 2

bennu_neo
Neo4j
Neo4j

Hi @Mariana ,

You may have some \r lost in the middle. Try something like:

 

 

MATCH (n:XmlWord11) 
where trim(n.text) = ""
detach delete n 

 

 

 

Oh, y’all wanted a twist, ey?

It worked! Thank you very much!