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.

Simple query: variable not defined.

This is my query:

match(n:PLAYER) RETURN player.name
 
And this is the error:
Variable `player` not defined (line 1, column 24 (offset: 23))
"match(n:PLAYER) RETURN player.name"
 
and this is an example of a PLAYER node:
{
  "identity": 0,
  "labels": [
    "PLAYER"
  ],
  "properties": {
"number": 0,
"name": "Russell Westbrook",
"weight": 91,
"age": 33,
"height": 1.91
  }
}
Seems like I'm doing everything correct.  can someone please explain what I'm doing wrong?  Seems like a bug in neo4j.
 
Thanks.
 
 
 
 
 
1 ACCEPTED SOLUTION

Cobra
Ninja
Ninja

Hello @gpadvorac 🙂

The correct query is:

 

MATCH (n:PLAYER) 
RETURN n.name

 

n is the variable, PLAYER is the label and name is a property. I hope it's more clear 🙂

Regards,
Cobra

View solution in original post

1 REPLY 1

Cobra
Ninja
Ninja

Hello @gpadvorac 🙂

The correct query is:

 

MATCH (n:PLAYER) 
RETURN n.name

 

n is the variable, PLAYER is the label and name is a property. I hope it's more clear 🙂

Regards,
Cobra