How to extract XML data from CLOB data type field in oracle table?
meda Changed status to publish 16/07/2022
In short, we can extract XML data from CLOB data type field of oracle database table using the following SQL statement:
select XMLTYPE(CLOB COLUMN).EXTRACT('//Node1/Node2/text()') .getStringVal() from table_name. Example: SELECT XMLTYPE(t.request).EXTRACT('//destAccount/instId/text()').getStringVal() dest_id FROM FTTB_OUT_CUSTOM t WHERE t.Txn_date BETWEEN :FROMDATE AND :TODATE AND t.NOTIFICATION_STATUS='F'
Amen Edited answer 27/05/2022