Skip to Main Content

Creating list by XMLAGG, XMLELEMENT throughs ORA-31186 error.

Rupa MohanJan 18 2018 — edited Jan 18 2018

Hi All,

I am using the below XMLAGG, XMLELEMENT for generating the list by concatenating the column row values. Ex : 123,456,789,908,765

Using:

select XMLAGG(XMLELEMENT(E,CODE_COMBINATION_ID,',')).EXTRACT('//text()').GetClobVal() text from ( SELECT CC.CODE_COMBINATION_ID,CC.CONTROL_CONTEXT_ID FROM HES_CODE_COMBINATIONS CC .....

But it works fine for the minimal no of rows.

But for the rows numbered nearly 500000 it throws the below error.

"ORA-31186: Document contains too many nodes

31186. 00000 -  "Document contains too many nodes"

*Cause:    Unable to load the document because it has exceeded

           the maximum allocated number of DOM nodes.

*Action:   Reduces the size of the document."

Kindly give an alternate solution for creating the column list for large no of rows .

Regards,

RM

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Feb 15 2018
Added on Jan 18 2018
3 comments
254 views