If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Have you looked at the DBMS_LOB package. There is no direct conversion, but you might be able to write some PL/SQL code to do the conversion. i.e. read the clob one chunk at a time and write it to the blob. Why are you converting the data anyway? If it is character data, you should keep it as a clob.

Unfortunately, I have to maintain poor legacy code.
The application takes text files in CLOBs and with poor and junky pl/sql code transfer the data into a table with BLOB.
I want to change this junky code.
I want to upload directly text files into the database.
I found how to upload text files into CLOB in the database.
In addition ,I found in Metalink a procedure that knows to convert CLOB to BLOB, but when I execute it, I've got an internal error.

-- -----------------------------------------------------------------------
-- THE FOLLOWING BLOCK OF CODE WILL ATTEMPT TO INSERT / WRITE THE CONTENTS
-- OF AN TXT FILE TO A CLOB COLUMN. IN THIS CASE, I WILL USE THE NEW
-- DBMS_LOB.LoadCLOBFromFile() API WHICH *DOES* SUPPORT MULTI-BYTE
-- CHARACTER SET DATA. IF YOU ARE NOT USING ORACLE 9iR2 AND/OR DO NOT NEED
-- TO SUPPORT LOADING TO A MULTI-BYTE CHARACTER SET DATABASE, USE THE
-- FOLLOWING FOR LOADING FROM A FILE:
--
-- DBMS_LOB.LoadFromFile(
-- DEST_LOB => dest_clob
-- , SRC_LOB => src_clob
-- , AMOUNT => DBMS_LOB.GETLENGTH(src_clob)
-- );
--
-- -----------------------------------------------------------------------