I have a table Transaction , in which I have a clob xclob for which ,
I want to update the "property" node's "record_start_dll_date" value to record_start_date(i.e I want to remove the _dll part ) and "record_dll_end_date" to record_end_date . I am using oracle database . How can I modify these node values??
<?xml version ="1.0"?>
<properties>
<property name ="record_start_dll_date">
<value>1/1/2021</value>
</property>
<property name ="record_dll_end_date">
<value>21/12/2021</value>
</property>
</properties>
You can use an XMLQuery update, either with the specific attribute values:
or to strip any
_dll
:Either way you can incorporate that into an update statement, with a matching XMLExists clause to avoid unnecessary updates:
db<>fiddle