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!

using DBMS_SQL to create dynamic procedure

siegwin.portJul 5 2025

Hi,

I want to create dynamically procedures using DBMS_SQL. So itried this example:

CREATE OR REPLACE PROCEDURE tt IS
texte dbms_sql.varchar2_table;
source_cursor INTEGER;
ret NUMBER;
BEGIN
texte(1) := 'create or replace proceure dyn_test is ';
texte(2) := 'begin ';
texte(3) := 'null;';
texte(4) := 'end;';
source_cursor := dbms_sql.open_cursor;
dbms_sql.parse(
source_cursor,
texte,
dbms_sql.native
);
ret := dbms_sql.execute(source_cursor);
dbms_sql.close_cursor(source_cursor);
END;

Compiler error:

11/5 PL/SQL: Statement ignored
11/5 PLS-00306: Falsche Anzahl oder Typen von Argumenten in Aufruf von 'PARSE'
Fehler: Compilerlog prüfen

Please help me.

Regards

Siegwin

This post has been answered by Markus Weber on Jul 5 2025
Jump to Answer
Comments
Post Details
Added on Jul 5 2025
3 comments
118 views