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_at_pebble.org>#1/1
Date: 1998/05/12
Message-ID: <slrn6lhf17.7a.joelga_at_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
-- [Quoted] [Quoted] These opinions are my own and not necessarily those of Information Quest jgarry_at_eiq.com http://www.informationquest.com http://ourworld.compuserve.com/homepages/joel_garry "See your DBA?" I AM the _at_#%*& DBA!Received on Tue May 12 1998 - 00:00:00 CEST