Reading text from a blob

Problem

You've got a blob, and you want to read some text from a file (that is, providing the file is a text file).

Solution

select utl_raw.cast_to_varchar2(dbms_lob.substr(file_blob,1000)) from ....

You can read up to 32k

Acknowledgment

http://stackoverflow.com/questions/828650/how-do-i-get-textual-contents-from-blob-in-oracle-sql

Comments