how to get oracle result in shell variable [message #248460] |
Fri, 29 June 2007 02:13 |
ammishra
Messages: 179 Registered: January 2007 Location: india
|
Senior Member |
|
|
Hi,
i am just doing R&D. i have created fallowing shell.it is working fine.
# !/bin/ksh
##### Environment variables ######
export ORACLE_HOME="/opt/oracle/product/current"
export PATH=$PATH:$ORACLE_HOME/bin:/usr/local/bin:.
##################################
dbLoginStr="RAMSADM/welcome123@NPIDEV"
sqlplus $dbLoginStr << EOT
select proj_id from ram_projects where rownum<2
/
EOT
exit;
can i get the proj_id value on shall variable.
--Yash
|
|
|
|
|
|
|
|
|