%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+How to split a urlencoded ";-" separated list of urls in a SPARQL query? 1 Assume the following string: "http://example.org/test1;http://example.org/test2". 1 In order to split the given string into two values i.e. http://example.org/test1 and http://example.org/test2 , one should use the Virtuoso function [[http://docs.openlinksw.com/virtuoso/fn_split_and_decode.html][split_and_decode()]] which returns an array. Thus the Virtuoso function [[http://docs.openlinksw.com/virtuoso/fn_aref.html][aref()]] also needs to be used for loading the elements. 1 Example: SELECT bif:aref (bif:split_and_decode('http%3A%2F%2Fexample.org%2Ftest1%3Bhttp%3A%2F%2Fexample.org%2Ftest2',0), 0) { ?S ?P ?O } LIMIT 1 * [[http://bit.ly/19eOiDE][View the SPARQL Query Definition via SPARQL Protocol URL]]; * [[http://bit.ly/18AgJS6][View the SPARQL Query Results via SPARQL Protocol URL]] ---++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]