'SP2-0734: unknown command beginning "elect' Error

My environment is HP-UX...

NIS CEL | uname -a
HP-UX s53kj113 B.11.11 U 9000/800 1510201964 unlimited-user license      

I ran this command directly from the server's sqllplus. Logically, it should have work.

But in my case, it always escaped the 1st character of the next command after the ';' and it will be repeatedly like that.

In other words, if I have 10 lines of error-free SQL command, only those odd line numbers command will work.

Example:

SQL> select 'test 1' from dual;
select 'test 2' from dual;
select 'test 3' from dual;
select 'test 4' from dual;
select 'test 5' from dual;
select 'test 6' from dual;
select 'test 7' from dual;
select 'test 8' from dual;
select 'test 9' from dual;
select 'test 10' from dual;
'TEST1
------
test 1

SQL> SP2-0734: unknown command beginning "elect 'tes..." - rest of line ignored.
SQL>
'TEST3
------
test 3

SQL> SP2-0734: unknown command beginning "elect 'tes..." - rest of line ignored.
SQL>
'TEST5
------
test 5

SQL> SP2-0734: unknown command beginning "elect 'tes..." - rest of line ignored.
SQL>
'TEST7
------
test 7

SQL> SP2-0734: unknown command beginning "elect 'tes..." - rest of line ignored.
SQL>

'TEST9
------
test 9

SQL> SP2-0734: unknown command beginning "elect 'tes..." - rest of line ignored.       

My .profile content..

ORACLE_HOME=/oracle/ora9.2
export ORACLE_HOME
PATH=/usr/bin:/etc:/oracle/ora9.2/bin:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/contrib/bin:.
export PATH
ORACLE_SID=celdwh
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
PS1='oracle9i >>'
export PS1
SHELL=/sbin/sh
export SHELL

stty erase "^H" kill "^U" intr "^C" eof "^D"

if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.

alias list='ls -lF|pg'
alias move='mv -i'
alias copy='cp -i'
alias rem='rm -i'
alias remA='rm -r -i'
alias remdir='rmdir -i'
alias ora_pro='ps -ef|grep ora_'
alias usage='cd /data/celusr/usage/'
alias cel01='cd /data/celusr/cel01/'
alias dba='cd /oracle/ora9.2/dba_/'
alias ctl='cd /oracle/ora9.2/dba_/ctl_file/'
alias tmmdata='cd /data/tmnusr/'
alias celdata='cd /data/celusr/'
alias reject='cd /data/celusr/reject'
alias oradata='cd /data/oradata/celdwh/'
alias celsub='cd /data/celusr/POSTPAID/SUBSCRIBER'
alias celnon='cd /data/celusr/POSTPAID/Non_CDR'
alias celusg='cd /data/celusr/POSTPAID/USAGE'
#alias alert='cd /oracle/oracle10g/product/10.2.0/admin/SIPIKAT/bdump'
EDITOR=vi;export EDITOR   

After logging in and before starting sqlplus, what do you get for these:

stty -a

echo $TERM

Also, is this a real terminal or a terminal emulator? What type of terminal it it?

For what reason are you not using /usr/bin/sh or /usr/bin/ksh ?

More importantly, why are we changing the $SHELL environment variable?
The variable is maintained by the login program. See "man 5 login".