Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to pass resoult of the sql to the system variable?
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
![]() |
![]() |