user13872454
user13872454

Reputation:

When using the strafter function in sparql it doesn't run because of an invalid line error

When using the STRAFTER in a sparql query it gives back an invalid line error, I'm not sure what is wrong with the line of code.

STRAFTER("http://dbpedia.org/resource/Xbox_One", "http://dbpedia.org/resource/")

I want the result to look like this ->

Xbox_One

Upvotes: 0

Views: 60

Answers (1)

Ivo Velitchkov
Ivo Velitchkov

Reputation: 2431

You need to bind the result to a variable.

SELECT ?LocalPart

{?s ?p ?o

BIND (STRAFTER("http://dbpedia.org/resource/Xbox_One", "http://dbpedia.org/resource/") AS ?LocalPart)

} 

LIMIT 1

Upvotes: 1

Related Questions