XML from Data Base Examples
SX-E-8 Making an XML element with nested XMLAGG() function
XML element with XMLAGG() function call as parameter
Example 8
This example produces an 'Emp' element with attribute 'Title' and a list of all employees having the title 'Sales Representative' as element content.
select XMLELEMENT ('Emp', XMLATTRIBUTES ("Title"),
XMLAGG (XMLELEMENT ('Name', "FirstName", ' ', "LastName")))
from "Demo"."demo"."Employees"
where "Title"= 'Sales Representative';
| View the source | Action |
|---|---|
| 1. sx_e_8_sample.vsp | Run |
OpenLink Home
Technical Support