Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's still not entirely clear to me what you're trying to achieve and why the example update that you give is not doing what you want, but if the aim is to have an update that replaces triples for a given subject, you could do something like this:</p> <pre class="lang-sql prettyprint-override"><code>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; @prefix ex: &lt;http://example.org/&gt; DELETE {?s ?p ?o} INSERT {?s ex:title "foo" ; ex:description "bar" ; rdf:type ex:FooBar . } WHERE { ?s ?p ?o . FILTER (?s = ex:subject1) } </code></pre> <p>The above operation will delete all existing triples with <code>ex:subject1</code> as the subject, and insert a new title, description, and type. </p> <p>Or if you don't like filters, you can also formulate the above like this:</p> <pre class="lang-sql prettyprint-override"><code>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; @prefix ex: &lt;http://example.org/&gt; DELETE {ex:subject1 ?p ?o} INSERT {ex:subject1 ex:title "foo" ; ex:description "bar" ; rdf:type ex:FooBar . } WHERE { ex:subject1 ?p ?o . } </code></pre> <p>If you only want to delete specific properties for a given subject (rather than all triples with that subject), you can modify the operation like so:</p> <pre class="lang-sql prettyprint-override"><code>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; @prefix ex: &lt;http://example.org/&gt; DELETE {ex:subject1 ex:title ?t ; ex:description ?d ; rdf:type ?c . } INSERT {ex:subject1 ex:title "foo" ; ex:description "bar" ; rdf:type ex:FooBar . } WHERE { ex:subject1 ex:title ?t ; ex:description ?d ; rdf:type ?c . } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload