Navigateur
Navigateur

Reputation: 1892

DELETE+INSERT and SELECT in one SPARQL query

I can't seem to perform a DELETE, INSERT and SELECT in one SPARQL query. I need to get the results of what was changed etc. in a very complex WHERE clause.

e.g.

SELECT ?name
DELETE {?someone :name: ?name}
INSERT {?someone :name ?newName}
WHERE {
    ...
}

Any ideas how to make it work, without repeating the WHERE calculation (which would be very inefficient)?

I get a syntax error upon DELETE (Expecting WHERE etc.)

Upvotes: 2

Views: 1978

Answers (1)

UninformedUser
UninformedUser

Reputation: 8465

There is no SELECT clause in SPARQL 1.1 Update. The syntax is

 DELETE quadpattern 
 INSERT quadpattern 
 WHERE ...

See https://www.w3.org/TR/2013/REC-sparql11-update-20130321/#deleteInsert

Upvotes: 1

Related Questions