Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle XMLAGG Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: XMLAGG

Definition:
In Oracle PL/SQL, XMLAGG is a built in aggregate function which combines multiple XML elements together. The main use of XMLAGG function is concatenating multiple row values of a column into single row.

Example Syntax:

XMLAGG(XML Type instance (ORDER BY clause))


Example Usage:

SELECT XMLAGG(XMLELEMENT(E,ename||',')).EXTRACT('//text()') "Result"
FROM employee_names
/

Result
-------------------------------------------------------------------
SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS


Related Links:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 75 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?