Search code examples
sparql

SPARQL delete statement


I am trying to delete some triples using a SPARQL query.

delete ?s ?p ?o {<http://www.example.org/test/unit213> ?p ?o.
            ?s ?p ?o}

I get the following error:

Executing query failed: MALFORMED QUERY: Parse error: unexpected terminal varname (value: ?s). Expected terminals: ({ qname qname_ns q_iri_ref from data).

What is the problem?


Solution

  • You need to wrap those triples in the delete:

    delete { ?s ?p ?o } ...