Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: calling stored procedures dymanic

Re: calling stored procedures dymanic

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 05 Aug 1999 12:31:04 GMT
Message-ID: <37af83d5.2354826@newshost.us.oracle.com>


A copy of this was sent to "Bernhard Riehm" <briehm_at_perbit.de> (if that email address didn't require changing) On Thu, 5 Aug 1999 11:56:27 +0200, you wrote:

>Hello,
>
>I want to create a trigger for a table.
>This trigger should call a stored procedure,
>which name is generated at runtime.
>At designtime of the trigger, I don't know all
>possible stored procedure calls.
>It is necessary that we can add stored procedures dynamically,
>and they should be called by the trigger.
>With DBMS_SQL I can only generate
>dynamic SQL-Statements.
>Is there a way to generate stored procedure calls?
>
>Bernhard Riehm,
>perbit Software GmbH.
>
>
>

dbms_sql does procedures:

create or replace procedure run_procedure( proc_name in varchar2 ) as

    exec_cursor integer default dbms_sql.open_cursor;     rows_processed number default 0;
begin

    dbms_sql.parse(exec_cursor, 'BEGIN ' || proc_name || '; END;',

                   dbms_sql.native );

    rows_processed := dbms_sql.execute(exec_cursor);     dbms_sql.close_cursor( exec_cursor ); end;
/

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Aug 05 1999 - 07:31:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US