Kayshav.com
About Developer Oracle 11g Technology Information Sitemap

Oracle 11g PL/SQL
-- The EXECUTE IMMEDIATE can take sql string in CLOB datatype
-- The query size can be as large the CLOB datatype size.

SET SERVEROUTPUT ON SIZE 1000000;

DECLARE
 v_sql    CLOB;
 v_date   VARCHAR2(100);

BEGIN
 v_sql := q'[
    SELECT TO_CHAR(SYSDATE,'Day mm/dd/yyyy hh24-mi-ss') FROM DUAL 
  ]';

 EXECUTE IMMEDIATE v_sql INTO v_date;

 DBMS_OUTPUT.PUT_LINE('Today Is -> '||REPLACE(v_date,'-',':'));
END;
/

Oracle 11g EXECUTE IMMEDIATE CLOB


Oracle 11gXEr2 - Index

Oracle registered trademark of Oracle Corporation.

Last Revised On: September 21, 2014

  39891