Reputation: 43
I am trying to excute a SPARQL query based on user type (user type must be employee and non employee) but am unable to excute query itself. This is the query:
Select ?user ?type Where { ?user org:chainOfCommand org:jw9583
?user rdfs:type org:EMPLOYEE}
this is the error that I get:
Error:Executing query failed: MALFORMED QUERY: Line 2, Found ?user (of type varname). Was expecting one of: BIND, FILTER, GEO, GRAPH, MINUS, OPTIONAL, SERVICE, TEXTINDEX, VALUES or punctuation ',', '.', ';', ']', '{', '}'.
Upvotes: 0
Views: 210
Reputation: 85853
You need a period between the triples in the query. I.e., the where body would look like
?user org:chainOfCommand org:jw9583 . ?user rdfs:type org:EMPLOYEE
There's a query validator at sparql.org that you can use to test the syntax of your queries if they're malformed. You may or may not find the messages there easier to understand.
Upvotes: 3