Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return codes from oracle

Status
Not open for further replies.

chirpyform

Programmer
Jun 20, 2003
202
FR
Hi,

I am in great urgence to find a solution to the following problem :
I have several sql scripts that create / drop sequencers, index and constraints. It's imperitive that i can test the return code from these sql scripts to know whether I continue with the rest. Unfortunately the function drop gives a return code non-zero even when it works!!!!

Can anybody tell me how i can know if the return code is serious or not.

Thanks

Chris
 
Is this a unix flavour return code? If it doesn't give the same code when it works and when it doesn't, you can code accordingly using $?. If it gives the same code ..... post back.
 

Use the "whenever sql error" command to set an identifiable return code when script fails:
Code:
WHENEVER SQLERROR EXIT 99;
-- Rest of script
EXIT 0;
[3eyes]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top