Quantcast
Channel: Is it possible to use a nested delete in SPARQL queries? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Is it possible to use a nested delete in SPARQL queries?

$
0
0

I would like to use a query to deduplicate resources using a unique id. An insert/delete - query doesn't work, because less nodes have to be created than are deleted. Is it possible to use something similar to this?

insert {
    ?new a mails:Account.
    ?new mails:hasID ?id.
    ?new rdfs:label ?label
  }
where {
    {
        select distinct ?id ?label where {
            ?account a mails:Account.
            ?account mails:hasID ?id.
            ?account rdfs:label ?label
        }
    }
    bind(bnode() as ?new)
    {
        delete where {
            ?account mails:hasID ?id
        }
    }
}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images