<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head profile="http://internetalchemy.org/2003/02/profile"> <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" /> <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> <meta name="dc.title" content="Function: GROUP_CONCAT - Virtuoso Functions Guide" /> <meta name="dc.subject" content="Function: GROUP_CONCAT - Virtuoso Functions Guide" /> <meta name="dc.creator" content="OpenLink Software Documentation Team ; " /> <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" /> <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" /> <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" /> <link rel="parent" href="functions.html" title="Chapter Contents" /> <link rel="prev" href="appendixa.html" title="Appendix" /> <link rel="next" href="functions.html#.html" title="" /> <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" href="doc.css" /> <link rel="stylesheet" type="text/css" href="/doc/translation.css" /> <title>Function: GROUP_CONCAT - Virtuoso Functions Guide</title> <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" /> <meta name="author" content="OpenLink Software Documentation Team ; " /> <meta name="copyright" content="OpenLink Software, 1999 - 2009" /> <meta name="keywords" content="" /> <meta name="GENERATOR" content="OpenLink XSLT Team" /> </head> <body> <div id="header"> <a name="fn_GROUP_CONCAT" /> <img src="../images/misc/logo.jpg" alt="" /> <h1>22. Virtuoso Functions Guide - GROUP_CONCAT</h1> </div> <div id="navbartop"> <div> <a class="link" href="functions.html">Chapter Contents</a> | <a class="link" href="fn_sample.html" title="SAMPLE">Prev</a> | <a class="link" href="fn_http_nt_triple.html" title="http_nt_triple">Next</a> </div> </div> <div id="currenttoc"> <form method="post" action="/doc/adv_search.vspx"> <div class="search">Keyword Search: <br /> <input type="text" name="q" /> <input type="submit" name="go" value="Go" /> </div> </form> <div> <a href="http://www.openlinksw.com/">www.openlinksw.com</a> </div> <div> <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a> </div> <br /> <div> <a href="index.html">Book Home</a> </div> <br /> <div> <a href="contents.html">Contents</a> </div> <div> <a href="preface.html">Preface</a> </div> <br /> <div> <a class="selected" href="functions.html">Virtuoso Functions Guide</a> </div> <br /> <div> <a href="functions.html#admin">Administration</a> </div> <div> <a href="functions.html#aggr">Aggregate Functions</a> </div> <div> <a href="functions.html#array">Array Manipulation</a> </div> <div> <a href="functions.html#bpel">BPEL APIs</a> </div> <div> <a href="functions.html#backup">Backup</a> </div> <div> <a href="functions.html#compression">Compression</a> </div> <div> <a href="functions.html#cursors">Cursor</a> </div> <div> <a href="functions.html#time">Date & Time Manipulation</a> </div> <div> <a href="functions.html#debug">Debug</a> </div> <div> <a href="functions.html#dict">Dictionary Manipulation</a> </div> <div> <a href="functions.html#encoding">Encoding & Decoding</a> </div> <div> <a href="functions.html#file">File Manipulation</a> </div> <div> <a href="functions.html#ft">Free Text</a> </div> <div> <a href="functions.html#hash">Hashing / Cryptographic</a> </div> <div> <a href="functions.html#ldap">LDAP</a> </div> <div> <a href="functions.html#localization">Locale</a> </div> <div> <a href="functions.html#mail">Mail</a> </div> <div> <a href="functions.html#misc">Miscellaneous</a> </div> <div> <a href="functions.html#number">Number</a> </div> <div> <a href="functions.html#phrz">Phrases</a> </div> <div> <a class="selected" href="functions.html#rdf">RDF data</a> </div> <div class="selected"> <div> <a href="fn_rdf_64bit_upgrade.html">db.dba.rdf_64bit_upg...</a> </div> <div> <a href="fn_rdf_audit_metadata.html">db.dba.rdf_audit_met...</a> </div> <div> <a href="fn_rdf_backup_metadata.html">db.dba.rdf_backup_me...</a> </div> <div> <a href="fn_rdf_convert_rdfxml_to_ttl.html">db.dba.rdf_convert_r...</a> </div> <div> <a href="fn_rdf_datatype_of_obj.html">db.dba.rdf_datatype_...</a> </div> <div> <a href="fn_rdf_graph_collect_fp_list.html">db.dba.rdf_graph_col...</a> </div> <div> <a href="fn_rdf_graph_diff.html">db.dba.rdf_graph_dif...</a> </div> <div> <a href="fn_rdf_graph_group_create.html">db.dba.rdf_graph_gro...</a> </div> <div> <a href="fn_rdf_graph_group_ins.html">db.dba.rdf_graph_gro...</a> </div> <div> <a href="fn_rdf_langmatches.html">db.dba.rdf_langmatch...</a> </div> <div> <a href="fn_rdf_load_rdfa.html">db.dba.rdf_load_rdfa</a> </div> <div> <a href="fn_rdf_load_rdfxml.html">db.dba.rdf_load_rdfx...</a> </div> <div> <a href="fn_rdf_load_rdfxml_mt.html">db.dba.rdf_load_rdfx...</a> </div> <div> <a href="fn_rdf_quad_uri.html">db.dba.rdf_quad_uri</a> </div> <div> <a href="fn_rdf_quad_uri_l.html">db.dba.rdf_quad_uri_...</a> </div> <div> <a href="fn_rdf_quad_uri_l_typed.html">db.dba.rdf_quad_uri_...</a> </div> <div> <a href="fn_rdf_regex.html">db.dba.rdf_regex</a> </div> <div> <a href="fn_rdf_restore_metadata.html">db.dba.rdf_restore_m...</a> </div> <div> <a href="fn_rdf_suo_apply_patch.html">db.dba.rdf_suo_apply...</a> </div> <div> <a href="fn_rdf_suo_diff_ttl.html">db.dba.rdf_suo_diff_...</a> </div> <div> <a href="fn_rdf_triples_to_rdf_xml_text.html">db.dba.rdf_triples_t...</a> </div> <div> <a href="fn_rdf_triples_to_ttl.html">db.dba.rdf_triples_t...</a> </div> <div> <a href="fn_rdf_ttl2hash.html">db.dba.rdf_ttl2hash</a> </div> <div> <a href="fn_rdf_void_store.html">db.dba.rdf_void_stor...</a> </div> <div> <a href="fn_sparql_eval.html">db.dba.sparql_eval</a> </div> <div> <a href="fn_sparql_eval_to_array.html">db.dba.sparql_eval_t...</a> </div> <div> <a href="fn_sparql_rdb2rdf_codegen.html">db.dba.sparql_rdb2rd...</a> </div> <div> <a href="fn_sparql_rdb2rdf_list_tables.html">db.dba.sparql_rdb2rd...</a> </div> <div> <a href="fn_sparql_rexec.html">db.dba.sparql_rexec</a> </div> <div> <a href="fn_sparql_rexec_to_array.html">db.dba.sparql_rexec_...</a> </div> <div> <a href="fn_sparql_rexec_with_meta.html">db.dba.sparql_rexec_...</a> </div> <div> <a href="fn_sparql_select_known_graphs.html">db.dba.sparql_select...</a> </div> <div> <a href="fn_ttlp.html">db.dba.ttlp</a> </div> <div> <a href="fn_ttlp_mt.html">db.dba.ttlp_mt</a> </div> <div> <a href="fn_ttlp_mt_local_file.html">db.dba.ttlp_mt_local...</a> </div> <div> <a class="selected" href="fn_GROUP_CONCAT.html">group_concat</a> </div> <div> <a href="fn_isref.html">isref</a> </div> <div> <a href="fn_sample.html">sample</a> </div> <div> <a href="fn___xml_get_ns_prefix.html">__xml_get_ns_prefix</a> </div> <div> <a href="fn___xml_get_ns_uri.html">__xml_get_ns_uri</a> </div> <div> <a href="fn_http_nt_triple.html">http_nt_triple</a> </div> <div> <a href="fn_http_ttl_triple.html">http_ttl_triple</a> </div> <div> <a href="fn_iri_split.html">iri_split</a> </div> <div> <a href="fn_ld_dir.html">ld_dir</a> </div> <div> <a href="fn_rdfs_rule_set.html">rdfs_rule_set</a> </div> <div> <a href="fn_sparql_to_sql_text.html">sparql_to_sql_text</a> </div> </div> <div> <a href="functions.html#rmt">Remote SQL Data Source</a> </div> <div> <a href="functions.html#repl">Replication</a> </div> <div> <a href="functions.html#soap">SOAP</a> </div> <div> <a href="functions.html#sql">SQL</a> </div> <div> <a href="functions.html#string">String</a> </div> <div> <a href="functions.html#txn">Transaction</a> </div> <div> <a href="functions.html#type">Type Mapping</a> </div> <div> <a href="functions.html#uddi">UDDI</a> </div> <div> <a href="functions.html#udt">User Defined Types & The CLR</a> </div> <div> <a href="functions.html#vad">VAD</a> </div> <div> <a href="functions.html#jvmpl">Virtuoso Java PL API</a> </div> <div> <a href="functions.html#bif">Virtuoso Server Extension Interface (VSEI)</a> </div> <div> <a href="functions.html#ws">Web & Internet</a> </div> <div> <a href="functions.html#xml">XML</a> </div> <div> <a href="functions.html#XPATH">XPATH & XQUERY</a> </div> <br /> <div> <a href="functionidx.html">Functions Index</a> </div> <br /> </div> <div id="text"> <h2>GROUP_CONCAT</h2> <div class="refpurpose">returns an arbitrary value from the multiset passed to it.</div> <div class="funcsynopsis"> <span class="funcdef"> <span class="function">GROUP_CONCAT</span> </span> (<span class="paramdef">in <span class="parameter">token</span> varchar</span>, <span class="paramdef">in <span class="parameter">delim</span> varchar</span>); </div> <div class="refsect1"> <div class="refsect1title">Description</div> <p>GROUP_CONCAT is aggregate function that performs a string concatenation across the values of an expression with a group. The order of the strings is not specified. The separator character used in the concatenation may be given with the scalar argument delimiter.</p> <p>Note: Using the "sql:" prefix is mandatory for this aggregate.</p> </div> <div class="refsect1"> <div class="refsect1title">Parameters</div> <div class="refsect2"> <span class="refsect2title">token – </span> An item that should be added to a delimited list. </div> <div class="refsect2"> <span class="refsect2title">delim – </span> The delimeter character to be used in the concatenation. </div> </div> <div class="refsect1"> <div class="refsect1title">Return Types</div> <p>any</p> </div> <div class="refsect1"> <div class="refsect1title">Examples</div> <a name="ex_GROUP_CONCAT" /> <div class="example"> <div class="exampletitle" /> <div> <pre class="programlisting"> SQL>SPARQL SELECT ?name, (sql:GROUP_CONCAT(?near, ' , ')) WHERE { GRAPH ?g { [] a foaf:Person ; foaf:name ?name ; foaf:based_near ?near } } LIMIT 10 name callret-1 ANY ANY ________________________________________________ Jonas Smedegaard nodeID://b6190457 , nodeID://b6190507 Dimitar Dimitrov http://mitko.dnsalias.net:8005/dataspace/person/dav#based_near , http://ods-qa.openlinksw.com/dataspace/person/dav1#based_near , http://ods-qa.openlinksw.com/dataspace/person/dav2#based_near Adam Harvey nodeID://b780751 John Breslin nodeID://b56694 John Breslin nodeID://b56694 Chris Bizer http://sws.geonames.org/2950159/ , http://dbpedia.org/resource/Berlin Leo Sauermann nodeID://b53598 Andreas Harth http://dbpedia.org/resource/Karlsruhe , nodeID://b53559 , nodeID://b53569 Alexandre Passant http://dbpedia.org/resource/Galway Leon Lord http://ods-qa.openlinksw.com/dataspace/person/t1#based_near No. of rows in result: 10 </pre> </div> </div> </div> <div class="refsect1"> <div class="refsect1title">See Also</div> <p> <a href="">SAMPLE</a> </p> </div> </div> <div id="footer"> <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div> <div id="validation"> <a href="http://validator.w3.org/check/referer"> <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /> </a> <a href="http://jigsaw.w3.org/css-validator/"> <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" /> </a> </div> </div> </body> </html>