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: swami bami <rob_at_dsdelft.nl>
Date: 2000/06/14
Message-ID: <#Dif95d1$GA.319@net003s>#1/1

> #! /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

Yes, it should

> DBMS_OUTPUT.PUT_LINE(RC);
> END;
> /
> EOF
And " read RtnCode" should be removed.

Even shorter :

#! /bin/ksh

parm='aaa'
ORA_LOGIN=un/pw

sqlplus -s $ORA_LOGIN << EOF
set serverout on size 2000;
DECLARE
BEGIN
DBMS_OUTPUT.PUT_LINE('$parm');
END;
/
EOF Received on Wed Jun 14 2000 - 00:00:00 CDT

Original text of this message

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