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: How to pass resoult of the sql to the system variable?

Re: How to pass resoult of the sql to the system variable?

From: Joel Garry <joelga_at_pebble.org>
Date: 1998/05/12
Message-ID: <slrn6lhf17.7a.joelga@pebble.org>#1/1

On Mon, 11 May 1998 15:29:04 -0400,
Robert Augustyn <augustyn_at_unn.unisys.com> wrote:
>Hi,
>I am trying to get value I sql select into to the operating system variable
>on unix
>Any idea how to do that other then spooling and then reading from a file?
>Thanks in advance for any help
>robert
>
>

this seemed to work on my system:

#!/bin/ksh
blabla=`sqlplus -s << EOD |tail -2|head -1 scott/tiger
set head off
select sysdate from dual;
EOD`
echo $blabla

-- 
These opinions are my own and not necessarily those of Information Quest
jgarry@eiq.com                           http://www.informationquest.com
http://ourworld.compuserve.com/homepages/joel_garry
"See your DBA?"  I AM the @#%*& DBA!
Received on Tue May 12 1998 - 00:00:00 CDT

Original text of this message

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