I have table called employee(id number, deatils XML) and deatils column is nullable.
Let us say I have inserted following data
insert into employee(1, '<xml><employee><name>Foo</name></employee></xml>');
insert into employee(2, null);
insert into employee(3, '<xml><employee><name>Bar</name></employee></xml>');
I have a IBM Optim tool which has a know bug which will not copy/restore this data into other schema because of null in second row. While extracting data will be extracted fine but insert into other schema will fail.
Work around for that is update the null value with some dummy xml, insert data and replace that dummy xml with null in traget database. I need db2 queries to do so.
I am doing
update employee set details='<xml></xml>' where details=null;
After this update i can extract data and insert into target but when I try to update the dummy xml i am getting errors.
Let us say I have tried like below (which wont work)
update employee set deatils=null where details='<xml></xml>';
Basically db2 is not able to find any records with my where clause due to xml stored as clob.
Please help!