We are facing problem in converting/casting DBCLOB to XML. The details
of the same below
We are storing some xml data in a column of type DBCLOB (1073741823).
For one of our requirement, we have to convert this data to XML type so
that we can take advantage of Xquery to filter the result. For doing
this conversion, we are using the following SQL query
SELECT XMLCAST (XMLPARSE (DOCUMENT (CAST (CAST (COLUMN1 AS DBCLOB
(32672)) AS VARCHAR (32672)))) AS XML from TABLE1
to convert DBCLOB to XML data type.
For some scenario the size of data in DBCLOB column is more than 32672
and, since we are converting DBCLOB to XML via VARCHAR, so the output
get limited to 32672, and XML conversion fails.