%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}%
---+How do I use SPARUL to change a selection of property values from URI References to Literals?
Assume a given graph where triples are comprised of property values that are mixed across URI References and Typed Literals as exemplified by the results of the
query below:
SELECT DISTINCT ?sa ?oa
FROM
WHERE
{
?sa a .
?sa ?oa . FILTER regex(?oa, '-','i')
}
You can use the following SPARUL pattern to harmonize the property values across relevant triples in a specific graph, as shown below:
SQL> SPARQL
INSERT INTO GRAPH
{
?sa `str (?oa)`
}
WHERE
{
?sa ?oa . FILTER regex(?oa, '-','i')
}
---+++Related
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[http://docs.openlinksw.com/virtuoso/rdfandsparql.html][RDF Data Access and Data Management]]