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: is is possible to retrieve a SELECT query's result in a shell script?

Re: is is possible to retrieve a SELECT query's result in a shell script?

From: Galen Boyer <galendboyer_at_yahoo.com>
Date: 17 May 2002 22:53:13 -0500
Message-ID: <uit5m7xio.fsf@rcn.com>


On Thu, 16 May 2002, gregory.luguet_at_evidian.com wrote:

> I am answering myself : I use the SPOOL directive to write the result
> in a file that I later parse

Spool works, but I like the following:

#!/bin/ksh

TableName=$1

sqlplus user/pass_at_instance << EOF

select * from $TableName;

EOF I added the variable substitution to show how you might just parameterize everything. :-)

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Fri May 17 2002 - 22:53:13 CDT

Original text of this message

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