Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is it possible to concatenate XMLType variable

543512Nov 15 2006 — edited Nov 27 2006
I'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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2006
Added on Nov 15 2006
13 comments
2,400 views