> I'd like to select every movie on DBpedia which release date is
> missing...but I don't know how to do it. I even tried to put a filter to
> check if there is an empty string but it doesn't work. This is how I get
> started:
> 
> PREFIX db-ont: <http://dbpedia.org/ontology/>
> PREFIX db-work: <http://dbpedia.org/ontology/Work/>
> PREFIX owl: <http://www.w3.org/2002/07/owl#>
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> 
> SELECT ?id ?uriFB ?data_uscita WHERE {
> ?id rdf:type db-ont:Film .
> ?id owl:sameAs ?uriFB .
> OPTIONAL {?id db-ont:releaseDate ?data_uscita .}
> }
> LIMIT 100
> 

You could use the bound operator to check if a variable is bound to a value or 
not.
So this query should work for you:

SELECT ?id ?uriFB ?data_uscita WHERE {  
?id rdf:type db-ont:Film . 
?id owl:sameAs ?uriFB . 
OPTIONAL {?id db-ont:releaseDate ?data_uscita }
FILTER (!bound(?data_uscita))
}
LIMIT 100

Regards,
Sören

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to