Dear experts,
I have CLOB column in the table and which is having data like below:
<billingDetails>
<createDate>2021-01-10T16:01:22.000-07:00</createDate>
<dueDate>2021-02-10T16:01:22.000-07:00</dueDate>
<fromDate>2021-02-12T16:01:22.000-07:00</fromDate>
<toDate>2021-03-12T16:01:22.000-07:00</toDate>
<mailed>false</mailed>
<autopay>true</autopay>
<reason><=$0 balance></reason>
</billingDetails>
I would like to replace node
<reason><=$0 balance></reason>
into
<reason>not valid</reason>
Means updated xml should be like below
<billingDetails>
<createDate>2021-01-10T16:01:22.000-07:00</createDate>
<dueDate>2021-02-10T16:01:22.000-07:00</dueDate>
<fromDate>2021-02-12T16:01:22.000-07:00</fromDate>
<toDate>2021-03-12T16:01:22.000-07:00</toDate>
<mailed>false</mailed>
<autopay>true</autopay>
<reason>not valid</reason>
</billingDetails>
What I have tried:
I have used below query but getting exception
<pre>UPDATE tab1 SET clob_column =
UPDATEXML(clob_column,
'/billingDetails/reason/text()','not valid')
WHERE sid =1
Exception:
[Error] Execution (20: 4): ORA-00932: inconsistent datatypes: expected - got -
Please help me to resolve and update xml node?
Thanks in advance