Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: URGENT !! How do I pass a parameter to this script ??

Re: URGENT !! How do I pass a parameter to this script ??

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/06/13
Message-ID: <960927866.18131.2.pluto.d4ee154e@news.demon.nl>#1/1

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

Original text of this message

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