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 -> Re: Passing Unix Vars to a Stored Procedure

Re: Passing Unix Vars to a Stored Procedure

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 3 Jan 2003 15:41:15 -0800
Message-ID: <92eeeff0.0301031541.4822da49@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 Received on Fri Jan 03 2003 - 17:41:15 CST

Original text of this message

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