On 09/10/15 08:21, Michael Brunnbauer wrote:
Hello Maria,
I am not aware of a way to express power with SPARQL. For powers of 10, you
could use casting:
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select (xsd:double(concat("1e",str(?exp))) as ?result) where { VALUES ?exp { 3
} }
Which brings me to an interesting observation. Why is ?a not bound in the
Fuseki result of this query?
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select (xsd:integer(1e2) as ?a) where { }
The DBpedia SPARQL endpoint returns 100.
"1e2"^^xsd:double is not "100"^^xsd:double. Same value, different term.
"1e2"^^xsd:integer isn't a valid integer.
xsd:integer("100"^^xsd:double) works.
(errors can extension points)
Andy
Regards,
Michael Brunnbauer
On Fri, Oct 09, 2015 at 12:19:00AM +0530, Maria Jackson wrote:
Dear All,
select ?a?b?c?r where{ graph ?graph1{?a ?b <object1>} graph ?graph21{?a ?c
<object2>} graph ?graph2{?a <time> ?r}} order by asc(?r+(1.1*10^(11)))
limit 1
If I write the above expression to denote: ?r + (1.1 x (pow(10,11))) then
will it be a correct expression in Jena. I am struggling to find how to
express power in Jena?