Tuesday, 24 February 2015

Concat rows values into single column

Concat rows values into single column

SQL>  select rtrim(xmlagg(xmlelement(e, empno || ',')).extract('//text()').extract('//text()') ,',') empnos from emp
/
EMPNOS                                                                        
--------------------------------------------------------------------------------
7369,7499,7521,7566,7654,7698,7782,7788,7839,7844,7876,7900,7902,7934  

No comments:

Post a Comment