Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is it possible to pass args. to a sql script
Casper Thrane wrote:
> Hi
>
> I have a sql-script in a file which i execute from sql-plus, but is it
> possible to pass arguments when I execute this script?
IF you use numbered substitution variables, then command line parameters can be used.
eg
if script1.sql contains the following
select * from
atable
where col1='&1'
and col2='&2'
;
then either
sqlplus uname/pwd @script1 parm1 parm2
or
SQL>@script1 parm1 parm2
will do the trick. Received on Mon Dec 01 1997 - 00:00:00 CST
![]() |
![]() |