I tried to create my xml-text:
SELECT XMLELEMENT(
"firms",
XMLAGG(
XMLELEMENT(
"firm",c
XMLELEMENT("FirmID", wo.id),
XMLELEMENT("Name", substr(wo.namerus, 1, 120)),
XMLELEMENT("ShortName", wo.code)
)
)
)
INTO my_var
FROM organs wo
WHERE type_id = 5;
dbms_output.put_line(my_var.GetClobVal());
But then I got an error :
ORA-06502: PL/SQL: numeric or value error
I know that my data is correct because if I doubled the first column three or more times I got this error again. How can i create a big xml?