On 01/05/12 20:45, Erich Bremer wrote:
This block of code fails using jena-core-2.7.0 and jena arq-2.9.0 but works when the count is taken out:String qs = "select distinct ?p count(?p) as ?up where {graph ?g {?s ?p ?o}} group by ?p";
SELECT distinct ?p (count(?p) as ?up) () is required around AS expressions
com.hp.hpl.jena.query.Query query = QueryFactory.create(qs, Syntax.syntaxSPARQL_11); QueryExecution qe = QueryExecutionFactory.create(query, ds); I thought the Syntax.syntaxSPARQL_11 was sufficient to get it working, but it isn't. Any advice appreciated. - Erich
SPARQL 1.1 is the default.
Erich Bremer http://www.ebremer.com
