Hello Sherman,

> Virtuoso 37000 Error SP030: SPARQL compiler, line 3: syntax error at 'SPARQL' 
> before 'INSERT'
> 
> SPARQL query:
> 
> #output-format:text/html
> define sql:signal-void-variables 1 SPARQL INSERT IN GRAPH 
> <http://BookStore.com> 
> { <http://www.dajobe.org/foaf.rdf#i> <http://purl.org/dc/elements/1.1/date> 
> <1999-04-01T00:00:00> .
>   <http://www.w3.org/People/Berners-Lee/card#i> 
> <http://purl.org/dc/elements/1.1/date> <1998-05-03T00:00:00> .
>   <http://www.w3.org/People/Connolly/#me> 
> <http://purl.org/dc/elements/1.1/date> <2001-02-08T00:00:00> };

When used in stored procedure or called via ISQL, it should be
SPARQL define sql:signal-void-variables 1 INSERT IN GRAPH ...
When called via SPARQL web service endpoint, the SPARQL keyword is not
needed at all.

"SPARQL" is a Virtuoso SQL keyword that indicates where SPARQL-to-SQL
front-end should start to read the text (and to replace the source
SPARQL text with compiled SQL fragment). So it should be placed before
DEFINE. Web service endpoint does not need this keyword because it does
not expect anything other than SPARQL and it don't have to distinguish
between SPARQL and surrounding SQL.

Best Regards,

Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com



Reply via email to