Hi All,
I need to make a SQL script and call it from Unix (bash) shell.
Code:
sqlplus vikas/vikas <<END
spool /oracle/vikas/output.txt
command 1
command 2
...
....
comman N
spool off;
commit;
END
This runs perfectly, but my problem is that if a command fails, the other commands keeps on running. However,
I need to keep a check that when a command fails the script is exited.
In unix we have an option of
echo $? to check the status of previous command, But how to accomplish this SQL.
Pls help !!
__________________
==> VIKAS <==