Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL: How use cmd-line param in stored proc. before DECLARE section?
Greetings:
Can anyone tell me how to use a parameter passed to a stored procedure, before the DECLARE section? Every example I've seen uses passed parameters within the BEGIN section, but I need to use them before that point...and can't figure out how. Assistance appreciated!
Here's a sample of the routine:
V_SOURCEROW OUTPUT_TABLE%rowtype;
cursor TEMP_CURSOR is
select
C1, C2 from TABLE_100 T1 where T1.C2 = '01-JAN-98'
INSERT INTO OUTPUT_TABLE ( C1, C2 ) VALUES ( V_SOURCEROW.C1, V_SOURCEROW.C2 );
My goal is to be able to pass the table name to the procedure at runtime. So I need to replace the "TABLE_100" with a parameter that is passed into the routine. But when I do this, the procedure produces errors when it compiles.
Can anyone point me in the right direction?
Thanks. Received on Wed Jan 20 1999 - 20:24:59 CST
![]() |
![]() |