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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I dynamically execute a procedure name?

Re: How can I dynamically execute a procedure name?

From: Jusung Yang <jusungyang_at_yahoo.com>
Date: 15 Aug 2002 10:29:23 -0700
Message-ID: <42ffa8fa.0208150929.3974985c@posting.google.com>


I thought Thomas had provided a very clear and correct answer to your problem? All you need to do is build a string with 'begin ', procedure name and '; end;' and then run execute immediate on on string. Look no further. You have your answer. In your case, it would look like :

create or replace procedure nf3_daily as   cursor cs1 is

 		select report_type 
 		from report_type;

  str1 varchar2(100);
begin
  open cs1;
     loop 
       fetch cs1 into daily_procedure;
       exit when cs1%NOTFOUND;

       str1 := 'begin '||daily_procedure||'; end;';
       execute immediate str1;




marcie.tietjen_at_westgroup.com (marcie) wrote in message news:<899474e5.0208141821.34d1a0dd_at_posting.google.com>...
> Brian,
>
> I've tried looking into execute immediately but can't get it to
> execute a procedure. The only examples I've been able to find execute
> a select, insert etc. I haven't been able to find an example or use a
> procedure with execute immediately.
>
> Any ideas?
> Thanks
Received on Thu Aug 15 2002 - 12:29:23 CDT

Original text of this message

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