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: Information

Re: Information

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 25 Jul 1999 14:57:26 GMT
Message-ID: <379b12e2.31774341@news.demon.nl>


On Fri, 23 Jul 1999 23:11:12 -0600, "spedward_at_msn.com" <spedward_at_email.msn.com> wrote:

>Hi,
>
>I've been saddled with a project at work which includes creating a shell
>script which pass variables into a sql script to run against our Oracle
>database. My programming knowledge is limited.
>
>Any suggestions, as far as references that could help me with this task?
>
>
>Thanks
>
>

This involves writing a sqlplus script like define par1 = &1 -- or better a more meaningful name for par1 define par2 = &2 -- and so on
select *
from <table>
where col1 = '&par1' -- string vars
 and col2 = &par2 -- numeric vars

and invoking it as
sqlplus -s <username>/<password>@<servicename> @<yourscript> value1 ..
Don't forget to enclose strings if there are spaces in it. This should be all...

Hth,

Sybrand Bakker, Oracle DBA Received on Sun Jul 25 1999 - 09:57:26 CDT

Original text of this message

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