Hi Hugh,

I have write permissions; now that you pointed to those docs I think it's a 
bug. Consider a query from virtuoso docs duplicated:

WITH <urn:x>
DELETE { ?person <http://xmlns.com/foaf/0.1/givenName> 'Bill' }
INSERT { ?person <http://xmlns.com/foaf/0.1/givenName> 'William' }
WHERE
  { 
    ?person <http://xmlns.com/foaf/0.1/givenName> 'Bill'
  } ;

WITH <urn:x>
DELETE { ?person <http://xmlns.com/foaf/0.1/givenName> 'Bill' }
INSERT { ?person <http://xmlns.com/foaf/0.1/givenName> 'William' }
WHERE
  { 
    ?person <http://xmlns.com/foaf/0.1/givenName> 'Bill'
  } 

This returns "Virtuoso 37000 Error SP030: SPARQL compiler, line 11: syntax 
error at 'WITH' before '<urn:x>'"
If I remove the second "with" clause line it works fine.
This means DELETE WHERE is supported even if not listed in the link you 
mentioned under "SPARQL 1.1".
Can you confirm it's a bug or it's intended not to work using "WITH" multiple 
times?


On Thursday, April 3, 2014 1:16 PM, Hugh Williams <hwilli...@openlinksw.com> 
wrote:
 
Hi Eugene,

You can perform multiple insert/delete commands against Virtuoso as detailed at:

http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtTipsAndTricksGuideSPARQLSingleMultipleExecution

Although note you have to execute against an endpoint with read/write access, 
which /sparql does not have by default so I suspect you were getting an error 
of the form:

Virtuoso 42000 Error SR186: No permission to execute procedure 
DB.DBA.SPARQL_DELETE_DICT_CONTENT with user ID 106, group ID 106

So you have to run against the /sparql-auth endpoint which challenges you for 
authentication and will then allow you to perform write operations, see the 
following docs for more details:

http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtTipsAndTricksGuideSPARQLEndpoints

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      //              http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 3 Apr 2014, at 10:27, Eugen F <feuge...@yahoo.com> wrote:

Hi,
>
>
>Is it possible to make a http request, to a "/sparql" endpoint, that has 
>multiple insert/delete commands that are executed in a transaction?
>I tried on virtuoso 7 and I get an error (but works if commands are in 
>separate calls).
>I found an older discussion here but not sure how it applies.
>If multiple commands are not possible, how can I make atomic changes using 
>sparql on 
>virtuoso?------------------------------------------------------------------------------
>_______________________________________________
>Virtuoso-users mailing list
>Virtuoso-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to