W3C home > Mailing lists > Public > public-sparql-dev@w3.org > July to September 2008

Re: Using SELECT instead ASK

From: Richard Cyganiak <richard@cyganiak.de>
Date: Thu, 24 Jul 2008 01:41:03 +0100
To: saraujo@inf.puc-rio.br
Message-Id: <F080C6C9-D600-4426-91AC-CF47F6998E89@cyganiak.de>
Cc: public-sparql-dev@w3.org


On 23 Jul 2008, at 19:09, saraujo@inf.puc-rio.br wrote:
> Hi people, I would like to get the SUBJECT of the following query:
>
> select ?o where {<http://www.semanticnavigation.org/2008/faceto> ?p ? 
> o}

I'm sure I don't have to mention that this is a rather pointless  
query ;-)

But I'm sure you have your (weird) reason.

I guess you are looking for something like this:

SELECT ?s
WHERE {
    ?s ?p ?o .
    FILTER (?s == <http://www.semanticnavigation.org/2008/faceto>)
}

Hope that helps,
Richard



>
>
> How could I do it with sparql SELECT?  Instead I get the object ?o I  
> would
> like to get the SUBJECT, is it possible using only SELECT?
>
> Regards
> Samur
>
>
Received on Thursday, 24 July 2008 00:43:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 24 July 2008 00:43:34 GMT