CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle DBMS_SQLPLUS_SCRIPT
Version 11.1
 
General
Note: Undocumented
Source $ORACLE_HOME/rdbms/admin/prvtscrp.plb
Dependencies
DBMS_SQLPLUS_SCRIPT_LIB
Data Types DBMS_SQLPLUS_SCRIPT.STMT_RECORD
DBMS_SQLPLUS_SCRIPT.BIND_RECORD
DBMS_SQLPLUS_SCRIPT.STMT_TABLE
DBMS_SQLPLUS_SCRIPT.BIND_TABLE
 
PARSE

Undocumented
dbms_sqlplus_script.parse(
src       IN  CLOB,
stmts     OUT PL/SQL TABLE); 
set serveroutput on

DECLARE
 srcclob CLOB;
 stmts   dbms_sqlplus_script.stmt_table;
BEGIN
  srcclob := CAST('BEGIN
INSERT INTO WORKSTATIONS VALUES (11,3,20037,'''',''Y'',61.137,-149.9395,''10.128.16.105'');
INSERT INTO WORKSTATIONS VALUES (11,5,20044,'''',''Y'',61.137,-149.9395,''10.128.32.129'');
COMMIT;
INSERT INTO WORKSTATIONS VALUES
(11,9,20048,'''',''Y'',61.137,-149.9395,''10.128.32.169'');
INSERT INTO WORKSTATIONS VALUES (12,1,20051,''15706'',''Y'',32.75604,-117.1201,'''');
INSERT INTO WORKSTATIONS VALUES (12,102,20057,'''',''Y'',32.75677,-117.1241,''10.129.112.25'');
INSERT INTO WORKSTATIONS VALUE (12,103,20058,'''',''Y'',32.75662,-117.124,''10.129.112.33'');
COMMIT;
END;' AS CLOB);


  dbms_sqlplus_script.parse(srcclob, stmts=>stmts);
  dbms_output.put_line(stmts.COUNT);
END;
/
 
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [218 users online]    © 2010 psoug.org