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 -> [Q] Generic programming

[Q] Generic programming

From: replace this with _at_ <_at_)xs4all.nl>
Date: 1997/09/30
Message-ID: <34316031.3059639@news.xs4all.nl>#1/1

Hello,

PROBLEM:
I want to call a procedure by using a variable as procedurename, but don't know if this is possible. Can someone give me a hint? Thanks in advance...

EXAMPLES:
(which doesn't work):

declare
  cursor c_procs is

  select	procedure_name
  from	project_procedures;

begin
  for r_procs in c_procs loop
    EXEC r_procs.procedure_name -- <<<<< THIS LINE NEEDS MODIFICATION   end loop;
end;

For obvious reasons, I don't want to use something like this:

declare
  ...
begin

  for r_procs in c_procs loop

    if r_procs.procedure_name = 'STARTUP' then       STARTUP;
    elsif r_procs.procedure_name = 'NEXTPROC' then       NEXTPROC;
    else
      EXITPROC;
    end if;

  end loop;

end;


Received on Tue Sep 30 1997 - 00:00:00 CDT

Original text of this message

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