Is it possible to concatenate XMLType variable
543512Nov 15 2006 — edited Nov 27 2006I'm using XQuery to query relational table and store the result into an xmltype variable as shown below:
SELECT XMLQuery('<Data>
{for $c in ora:view("TABLEA")
let $id := $c/ROW/ID/text(), $code := $c/ROW/CODE/text(),
return
<result>
<type>I</type>
<id>{$id}</id>
<code>{$code}</code>
</result> </Data>' RETURNING CONTENT)
INTO V_Delete FROM dual;
Similarly, I query other tables and store the result in xmltype variable. My requirement is to generate one xml file out of it. This would mean that I would need to consolidate the values stored in different xmltype variables. Is it possible to concatenate the xmltype varialbe? If so, how? If not, what is the alternative? I tried converting it to string, but then the 4000 limit caused an error.