CLOB to VARCHAR2
The example shows the use of DBMS_LOB package to convert CLOB data to VARCHAR2(4000) data. Also this shows the use of DBMS_METADATA.get_ddl(....) to get DDL of a data warehouse load status log table.

CLOB to VARCHAR2
SELECT DBMS_LOB.substr(q_tab.ddl_out,4000,1)  ddl_out
FROM  (SELECT
        DBMS_METADATA.get_ddl('TABLE','DW_LOAD_STATUS_LOG') ddl_out
       FROM DUAL) q_tab;



  DBMS_LOB - CLOB Processing

  CLOB Processing (PL/SQL block)

  DBMS_LOB - BLOB Processing

Oracle registered trademark of Oracle Corporation.

Last Revised On: October 27th, 2013

  429