Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: URGENT !! How do I pass a parameter to this script ??
Either use
sqlplus -s $ORA_LOGIN $parm
or use the redirection
with the line
accept rc
in your script before the anonymous block.
Hth,
Sybrand Bakker, Oracle DBA
<dejaadas_at_my-deja.com> wrote in message news:8i5ua7$aj0$1_at_nnrp1.deja.com...
> I have the following script and would like it to take the
> $parm value as the &1 parameter. How can I do this ?
> --------------------------
> #! /bin/ksh
>
> parm='aaa'
> ORA_LOGIN=uid/pwd
>
> sqlplus -s $ORA_LOGIN << EOF read RtnCode
> set serverout on size 2000;
> DECLARE
> RC VARCHAR2(10) DEFAULT NULL;
> BEGIN
> RC := '&1'; -- &1 should be = $parm
> DBMS_OUTPUT.PUT_LINE(RC);
> END;
> /
> EOF
> --------------------------
>
> TIA
> Das
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Jun 13 2000 - 00:00:00 CDT