Hello Pando

That was a typing mistake from me i am extremely sorry.here is teh right solution .


#!/bin/bash
sqlplus -s user/passwd@move << EOF |grep '^ORA'
select * from kk;
set echo on
variable temp number
whenever sqlerror exit sql.sqlcode;
begin
:temp := 25; -- this is really a function call, not 25
if ( :temp <> 0 )
then
raise_application_error( (-20000-224) - :temp, 'test' );
end if;
end;
/
EOF
set x=$?
echo $?

now save this file as test.sh

and now do

sh test.sh

output would be
ORA-00942: table or view does not exist
ERROR at line 1:
ORA-20279: test
ORA-06512: at line 5


regards
Hrishy




[Edited by hrishy on 11-22-2001 at 01:45 AM]