Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I dynamically execute a procedure name?
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;
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