Contents Index XMLAGG function [String] XMLELEMENT function [String]

ASA SQL Reference
  SQL Functions
    Alphabetical list of functions

XMLCONCAT function [String]


Function 

Produces a forest of XML elements.

Syntax 

XMLCONCAT ( xml-value,... )

Parameters 

xml-value    The XML values to be concatenated.

Usage 

Generates a forest of XML elements. In an unparsed XML document, a forest refers to the multiple root nodes within the document. NULL values are omitted from the result. If all the values are NULL, then NULL is returned. XMLCONCAT does not check whether the argument has a prolog. If you require a well-formed XML document, you must ensure that your query is written so that a single root element is generated.

Element content is always quoted unless the data type is XML. Data in BINARY, LONG BINARY, IMAGE, and VARBINARY columns is automatically returned in base64-encoded format when you execute a query that contains XMLCONCAT.

Standards and Compatibility 
See also 

Using the XMLCONCAT function

XMLFOREST function [String]

Example 

The following query generates <cust_id>, <cust_fname>, and <cust_lname> elements for each customer.

SELECT XMLCONCAT( XMLELEMENT ( NAME cust_id, id ),
                  XMLELEMENT( NAME cust_fname, fname ),
                  XMLELEMENT( NAME cust_lname, lname )
                 ) AS "Customer Information"
FROM customer
WHERE id < 120

Contents Index XMLAGG function [String] XMLELEMENT function [String]