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!

UpdateXML using another table (newbie question :) )

933216May 1 2012 — edited May 3 2012
Hi,
I am struggling to find a way to do this....
I have table A (O-R XML Type..tied to the schema and everything). Table A acts as my staging table.
There is another table B..exactly like A but this is the production table. Both A and B have just one column of type XMLType.

I want to merge each of the row from A to the one single row in B such that if B's XML contains the element then it is just updated (identified by a key) else added to the B XML.

updateXML doesnt allow me to pass two OBJECT VALUES...
UPDATE B SET OBJECT_VALUE = updateXML(B.OBJECT_VALUE,'/parent/chilld' <-- How do I specify here that if A contains this child then update else add?) How do I even bring in A here?
can someone help?
thanks in advance,
-v-
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2012
Added on May 1 2012
9 comments
412 views