Hi Alexey,

The "insert data ..." syntax does indeed fail as you indicate:

SQL> sparql insert data into <http://sample1/> { _:genid1 <p> <o1a> };

*** Error 37000: [Virtuoso Driver][Virtuoso Server]SQ074: Line 1: SP031: SPARQL 
compiler: Blank node '_:genid1' is not allowed in a constant clause
at line 12 of Top-Level:
sparql insert data into <http://sample1/> { _:genid1 <p> <o1a> }
SQL>

But the following syntax does insert successfully:

SQL> sparql insert in graph <http://sample1/> { _:genid1 <p> <o1a> };

Done. -- 4 msec.
SQL> sparql select * from <http://sample1/> where {?s ?p ?o};
s                                                                               
  p                                                                             
    o
VARCHAR                                                                         
  VARCHAR                                                                       
    VARCHAR
_______________________________________________________________________________

nodeID://b76978246                                                              
  p                                                                             
    o1a

1 Rows. -- 1 msec.
SQL>

even though the blank nodes are stored using the Virtuoso internal format.

I shall check with development why "insert data ..." does not work as I would 
expect both syntaxes to behave the same ...

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 2 Jan 2013, at 16:12, Alexey Zakhlestin <[email protected]> wrote:

> Is it possible to use blank nodes in INSERT DATA statements?
> 
> Rumors tell, that spec allows it:
> http://answers.semanticweb.com/questions/12342/is-it-possible-to-use-blank-node-in-sparql-insert-data-queries
> 
> I get this error:
> Virtuoso 37000 Error SP031: SPARQL compiler: Blank node '_:genid1' is not 
> allowed in a constant clause
> 
> 
> -- 
> Alexey Zakhlestin
> https://github.com/indeyets
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
> and much more. Keep your Java skills current with LearnJavaNow -
> 200+ hours of step-by-step video tutorials by Java experts.
> SALE $49.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122612 
> _______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to