> > > > David Fitzjarrell- Hide quoted text -
>
> - Show quoted text -
I can't understand what your issue is, really, as I can get such
scripts to work without error:
#!/bin/ksh
# variables
export USR=****
export PWD=####
export TAB=emp
export ENAME="JAMES"
export ORACLE_SID=%%%%%%%%%
if [ "$ORACLE_HOME" = "" ]
then
echo "Enter ORACLE_HOME: \n"
read a
export ORACLE_HOME=$a
fi
SCHEDULE=`$ORACLE_HOME/bin/sqlplus /nolog <<EOF
connect $USR/$PWD@$ORACLE_SID
set pagesize 0 feedback off verify off heading off echo off
select * from $TAB where ename = '$ENAME';
EOF`
print $SCHEDULE
And the output is:
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Oct 14 11:11:39 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved. SQL> Connected.
SQL> SQL> 7900 JAMES CLERK 7698 03-DEC-81 950 30 7967 JAMES CLERK 7698
17-JAN-82 950 40 8012 JAMES CLERK 7698 17-JAN-82 950 50 8027 JAMES
CLERK 7698 03-MAR-82 950 60 SQL> Disconnected from Oracle Database 10g
Enterprise Edition Release 10.2.0.3.0 - 64bit Production With the Data
Mining option
As you can verify the script works without error.
For your information a 'here document' (such as you have attempted to
write) requires the EOF be on a separate line after the end of the
submitted text (note my example above).
David Fitzjarrell