UpdateXML using another table (newbie question :) )
933216May 1 2012 — edited May 3 2012Hi,
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-