1
votes

I want to update a value in xml

update trb1_sub_errs set error_status='READY_TO_RECYCLE',general_data_c=UPDATEXML(xmltype (general_data_c),'//DATA/CmHeaderTransaction/TransactionRsn/text()','CREQ') where SUB_TRX_ID=4678604091; update trb1_sub_errs set error_status='READY_TO_RECYCLE',general_data_c=UPDATEXML(xmltype (general_data_c),'//DATA/CmHeaderTransaction/TransactionRsn/text()','CREQ') where SUB_TRX_ID=4678604091 * ERROR at line 1: ORA-00932: inconsistent datatypes: expected CLOB got -

Please help me to resolve it

1

1 Answers

0
votes

Adding .getClobVal() at the end worked. I found from https://community.oracle.com/thread/1061979?tstart=0

update trb1_sub_errs 
set error_status='READY_TO_RECYCLE',
general_data_c=UPDATEXML(xmltype(general_data_c),'//DATA/CmHeaderTransaction/TransactionRsn/text()','CREQ').getClobVal()
where SUB_TRX_ID=4678604091;