Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: passing values to sql script freom dos prompt please help! need it urgently
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
![]() |
![]() |