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: passing values to sql script freom dos prompt please help! need it urgently

Re: passing values to sql script freom dos prompt please help! need it urgently

From: Anurag Minocha <anurag_at_synergy-infotech.com>
Date: Thu, 01 Jul 1999 20:14:30 +0530
Message-ID: <377B7ECD.855D1974@synergy-infotech.com>


Hi,
Thanks a lot for your help.
I tried the following but it doesn.t seem to work

sql script name = test.sql
body:
spool &filename
select * from tab;
spool off

from the dos prompt i gave
c:\>sqlplus -s <username/pwd>@database @ test.sql tables.log

It still asks me enter the filename.

thanks
anurag

Sybrand Bakker wrote:

> Hi Anurag
> In your sqlplus script you can reference &1 &2 etc upto 8 or 9
> it is advisable to assign those to meaningful variables immediately.
> Then just call
> sqlplus -s <username/pwd>@database @<scriptname> parm1 parm2
> etc etc.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> Anurag Minocha <anurag_at_synergy-infotech.com> wrote in message
> news:3779EE2F.E2308F8A_at_synergy-infotech.com...
> > Hi,
> > How do I pass values to SQL script using DOS batch file variable like %1
> >
> > , %2..
> >
> > anurag
> >
> > reply at
> > anurag_at_synergy-infotech.com.
> >
> >
> >
Received on Thu Jul 01 1999 - 09:44:30 CDT

Original text of this message

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