Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to convert blob data into clob using plsql

prakashFeb 6 2012 — edited Feb 6 2012
hi all,


I have requirement to convert blob column into clob .
version details
BANNER

Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE	11.1.0.7.0	Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
DECLARE
   v_blob      temp.blob_column%TYPE;------this is blob data type column contains  (CSV file which is  inserted  from screens)
   v_clob      CLOB; --i want to copy blob column data into this clob 
   v_warning   NUMBER;
BEGIN
   SELECT blob_column
     INTO v_blob
     FROM temp
    WHERE pk = 75000676;

   DBMS_LOB.converttoclob (dest_lob          => v_clob,
                           src_blob          => v_blob,
                           amount            => DBMS_LOB.lobmaxsize,
                           dest_offset       => 1,
                           src_offset        => 1,
                           blob_csid         => 1, -- what  is the use of this parameter 
                           lang_context      => 1,
                           warning           => v_warning
                          );
   DBMS_OUTPUT.put_line (v_warning);
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (SQLCODE);
      DBMS_OUTPUT.put_line (SQLERRM);
END;
I am not getting what is the use of blob_csid , lang_context parameters after going the trough the documentation .


Any help in this regard would be highly appreciated .......

Thanks

Edited by: prakash on Feb 5, 2012 11:41 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2012
Added on Feb 6 2012
1 comment
1,668 views