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 -> unix/sqlplus host variables

unix/sqlplus host variables

From: ab <a_at_b.com>
Date: Wed, 7 Nov 2001 19:43:32 +0100
Message-ID: <9sbvcu$h8u$1@hadron.noos.net>


I would like to get in a unix variable the result of a query in a ksh script.

The ksh script i wrote is like (which doesn't work)

#! /bin/ksh
sqlplus $user/$password << EOF
select count(*) into :nRes from Table
EOF
echo $nRes

I didn't find any way to get the result of my query without using a temporary file or the instruction : var=`sqlplus ...`

is there any way to return a sqlplus result in a unix variable ?

Thanks for any answer !! Received on Wed Nov 07 2001 - 12:43:32 CST

Original text of this message

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