cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Compare properties of one node with string or property of other node

This Query:

MATCH (m:YELLOW {chars:['preceedingChar','suceedingChar']})
MATCH (s:GREEN) WHERE s.name CONTAINS m.name
MERGE (n:YELLOW {{name:m.name}})<-[:Mark]-(s) 
SET n.creationTime = timestamp() 
RETURN n

Produces this result

The two n:YELLOW-nodes in the top of the picture is created by the MERGE.
I want to further narrow the MATCH to only create n:YELLOW-node if the s:GREEN s.name contains m:YELLOW m.name, but with the m.chars[0] in front of the m.name and the m.chars[1] in the end.

In other words
MATCH (s:GREEN) WHERE s.name CONTAINS m.chars[0] + m.name + m.chars[1]

1 REPLY 1

Hello @VilladsClaes

What is the problem?

Regards,
Cobra