I have experience using MSSQL 2008, and I recently had to migrate from MSSQL to Oracle 10g. The people who designed the table (Oracle), in which there is a column from which I need to extract data, used a column of type BLOB for XML, which they need to store.
In MSSQL, you would just save your XML string as an XML type or use VARCHAR(MAX) . Suppose the table myTable has a column named myColumn , which is VARCHAR(MAX) containing <ROOT><a>111</a></ROOT> . If you want to convert the VARCHAR(MAX) type to an XML type, you simply write something like:
SELECT CONVERT(XML, myColumn) FROM myTable
if you want, you could use XQuery to get data from the transformed column, for example:
SELECT CONVERT(XML, myColumn).query('/ROOT/a')
How would you do the same in Oracle 10g if myColumn was a BLOB without having to write a stored procedure, but still making it reusable? Text in the BLOB UFT-8 block.
I would really appreciate your help, as I need it in a hurry.
source share