# How to query SPARQL with spaces?

 RDF itself uses RDF URI references. The SPARQL query language, on the other hand, uses IRIs (the reason is that RDF predates IRIs and the notion of RDF URI references was developed in anticipation of what IRIs were expected to eventually look like. They almost got it right :)).


RDF URI references allow whitespaces while IRIs do not. 

Another way of doing this is by using FILTER (STR(?Y)) "your url") like below:


PREFIX owl:  

SELECT ?y 

WHERE { 

   ?y owl:sameAs ?x

   FILTER (str(?x) = "http://website.com/urls/playing fun")

}

[1]. http://stackoverflow.com/questions/9055146/querying-with-spaces-sparql