Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: procedure name as a variable
hello,
In article <6k059d$n70$1_at_excalibur.flash.net>, "Juan" <jgarza_at_tdhca.state.tx.us> writes:
> Is there anyway to call a procedure where the name
> of the procedure is in a variable. (like a pointer
> or something).
yes, it is called dynamic sql. opena cursor and execute a string as an sql
command - take a look at dbms_sql.def
>
> example:
> procedure Test1 is
> v_procedure_name varchar2(20);
> begin
> v_procedure_name := 'Test2';
> v_procedure_name;
> end;
but remember to put the procedure call into a block:
" begin "+v_procedure_name+"; end; "
>
>
>
>
HTH
seci
>
Received on Thu May 21 1998 - 09:26:52 CDT
![]() |
![]() |