Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing Unix Vars to a Stored Procedure
"Rauf Sarwar" <rs_arwar_at_hotmail.com> wrote in message
news:92eeeff0.0301031541.4822da49_at_posting.google.com...
> "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
Thanks guys! Received on Sun Jan 05 2003 - 05:11:27 CST
![]() |
![]() |