KSH Sqlplus strange problem



Hi,

trying this

===============================
Temp=`sqlplus -s user/passwd <<EOF
WHENEVER SQLERROR EXIT 1
set serverout on
set feedback off
set heading off
select nam from tabel1
where x=y;
EOF`

echo Temp>>$logfile
=================================

The select statement is wrong on purpose (the column doesn't exist)

The output I am getting is:

select nam from tabel1xyz.logbgt.out........etc....lots of filenames
of the current directory....where x=y....ORA-XXX ERROR.

Also if I write the select statement as

select nam from tabel1 where x=y;

The output is

select nam from tabel1 where x=yxyz.logbgt.out........etc....lots of
filenames of the current directory........ORA-XXX ERROR.

The garbage prints after the first newline I think.

This doesn't happens when the select statement is corrected.

Will appreciate any hint on this behavior ..thanks..

Amit

.



Relevant Pages