Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing Unix Vars to a Stored Procedure
"rmartin" <rmartin_at_n^t^l^w^o^r^l^d^.c^o^m> wrote in message news:<av4agk$h8a$1_at_pheidippides.axion.bt.co.uk>...
> I need to pass Unix variables to a PL/SQL Stored Proc.
>
> I call the procedure like so (I've ommited the sql logon info etc):
>
> @proc.sql $1 $2 $3
>
> But how do I access these in my Stored Proc?
>
> What is the notation for assigning a Unix var to a Stored Proc IN Var?
>
> Thanks in advance.
&1 &2 &3 and so on.
e.g.
File called test.sql contains following,
SET SERVEROUT ON
BEGIN
DBMS_OUTPUT.PUT_LINE('&1');
END;
/
SQL> @test.sql "This is a test"
old 2: dbms_output.put_line('&1');
new 2: dbms_output.put_line('This is a test');
This is a test
PL/SQL procedure successfully completed.
Regards
/Rauf Sarwar
Received on Fri Jan 03 2003 - 17:41:15 CST
![]() |
![]() |