Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Use shell script parameter in sql script?!

Re: Use shell script parameter in sql script?!

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Tue, 14 Sep 1999 07:44:32 -0400
Message-ID: <37DE351F.45AB49AB@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 - 06:44:32 CDT

Original text of this message

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