In two tables I have a column called table1.column_xml and table2.column_xml_2 defined as CLOB(1000000). The fields in the column contain XML formatted information like below

 <comment>test test test</comment>
 <title>TEST MAN</title>                                         

What I would like to do is import/or replace any existing values in table2.column_xml_2 with the values from table1.column_xml.

So in simpler terms I want to export the values from column_xml into a file then import/replace into column_xml_2

closed as unclear what you're asking by mustaccio, Philᵀᴹ, Laurenz Albe, John Eisbrener, McNets Oct 23 at 19:47

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Why don't you just

update table2 set column_xml2 = 
(select column_xml from table1 where <predicate clause>) where <predicate clause>;


With CLOBs you pretty much have to do that. You can only update the entire CLOB. Now if are on DB2 9.1 or higher, you could store these in a field of type XML and then you could attempt to update specific XML elements like how you are hoping to do.

Not the answer you're looking for? Browse other questions tagged or ask your own question.