不一致的数据类型:预期的CLOB得到了

时间:2015-04-12 10:16:20

标签: oracle

我想更新xml中的值

更新trb1_sub_errs设置error_status =' READY_TO_RECYCLE',general_data_c = UPDATEXML(xmltype(general_data_c),' // DATA / CmHeaderTransaction / TransactionRsn / text()',' CREQ')其中SUB_TRX_ID = 4678604091; 更新trb1_sub_errs设置error_status =' READY_TO_RECYCLE',general_data_c = UPDATEXML(xmltype(general_data_c),' // DATA / CmHeaderTransaction / TransactionRsn / text()',' CREQ&#39 ;)其中SUB_TRX_ID = 4678604091                                                                         * 第1行的错误: ORA-00932:不一致的数据类型:预期的CLOB得到 -

请帮我解决一下

1 个答案:

答案 0 :(得分:0)

在最后工作时添加.getClobVal()。我从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;