Forum Stats

  • 3,872,897 Users
  • 2,266,488 Discussions
  • 7,911,373 Comments

Discussions

Not able to Export XMLAGG output.

User_U5XKZ
User_U5XKZ Member Posts: 2 Green Ribbon
edited Aug 18, 2022 12:26PM in SQL Developer

When i try to export result of XMLAGG function in SQL Developer. I get blank values in Excel Sheet against the Column.

Please let me know how to resolve this.

They Query is as follows:

SELECT XMLCAST(

XMLAGG(XMLELEMENT(E,NAME,'#') .EXTARACT('//text()') ORDER BY ID )

AS CLOB

) AS NAME_LIST

FROM EMPLOYEE

GROUP BY ID;

Using the above Query i do not get values in the export Excel file.

But, when i use following below query, I am able to export the data in Excel but, special characters like &,>,<, get converted in XML form of &amp;, &gt;,

They Query is as follows:

SELECT

XMLAGG(XMLELEMENT(E,NAME,'#') .EXTARACT('//text()') ORDER BY ID )

AS NAME_LIST

FROM EMPLOYEE

GROUP BY ID;

Tagged:

Answers