Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Use shell script parameter in sql script?!
Not sure you really wanted to escape the $1 in that example....
Jim
Kenneth C Stahl <BlueSax_at_Unforgettable.com> wrote in message
news:37DE351F.45AB49AB_at_Unforgettable.com...
> Mario Bucsics wrote:
>
> > No, but if you pass parameters to the shell script you can
> > use the &1 &2 &3 ... in your sql script.
> >
> > Mario Bucsics
> >
> > * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
> > The fastest and easiest way to search and participate in Usenet - Free!
>
> Of course shell variables can be used. Try this:
>
> #!/bin/ksh
> sqlplus -s scott/tiger <<-sqlEOF
> set pages 0;
> set feedback off;
> select *
> from emp
> where empno = '$1';
> exit success;
> sqlEOF
> exit 0;
>
>
>
Received on Tue Sep 14 1999 - 12:41:36 CDT
![]() |
![]() |