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 a procedure.

Re: Calling a procedure.

From: Alex P. Zotov <alex_at_soft-review.kiev.ua>
Date: Mon, 7 Feb 2000 17:34:31 +0200
Message-ID: <AAgNkduS80G@soft-review.kiev.ua>


<thezig_at_my-deja.com> wrote in message news:87lb1d$mjn$1_at_nnrp1.deja.com...
> I am trying to find a way to call a PL/SQL procedure if the name of the
> procedure to be called is stored in a VARCHAR2. Any help would be
> appreciated.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

  1. In 8.1 and latest you can use: declare ProcName varchar2(30); begin ProcName := 'test'; execute immediate 'begin ' || ProcName || '; end;'; end;
  2. In previous versions you can use dbs_sql: declare ProcName varchar2(30); Cr integer; Res integer; begin ProcName := 'test'; Cr := dbms_sql.open_cursor; dbms_sql.parse(Cr, 'begin ' || ProcName || '; end;', dbms_sql.v7); Res := dbms_sql.execute(cr); end; -- Alex P. Zotov
Received on Mon Feb 07 2000 - 09:34:31 CST

Original text of this message

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