Link to home
Start Free TrialLog in
Avatar of jleffelm
jleffelm

asked on

Where Can I Find SQLPlus Error Return Codes

I am using the following statements in my sql files:

WHENEVER SQLERROR EXIT SQL.SQLCODE;

Can anyone tell me where to look to find out what these return values correspond to?  I would prefer that the e-mail that gets sent out on an error not say "Failed To Analyze, Error Code: 174".  It would be a little more helpfule to say output "Table or View Does Not Exist", as an example. Anything that would list what these are, or a way of obtaining what they mean would be appreciated.

-Drew Leffelman
Avatar of VGR
VGR

you don't even tell us which RDBMS you use 8-)))

in Oracle via OCI8, you've the OCIError() function
Avatar of Lowfatspread
is this db2/udb?

SQLERRORs are negative values of SQLCODE
SQLWARNINGS are positive values of the SQLCODE

you should have a messages and codes manual which lists the main values ...
if not try the IBM site for Db2, which has all the manuals... available in pdf or Html bookmanager format...
sorry don't have a url to hand.

hth
 

Avatar of jleffelm

ASKER

I am using Oracle 8.1, I believe.  Sorry, didn't realize I forgot to mention that.

I am using SQLPLus.  As to SQLERROR being negative, and SQLWARNINGS being positive, are you sure?  Because when I have a misnamed table, it returns a positive number to Unix when I use the $? command.  Or is that just that Unix only returns positive numbers with that command?  I will try and find the site  you were referring to.

-Drew Leffelman
ASKER CERTIFIED SOLUTION
Avatar of Rgusmao
Rgusmao

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try SQL.SQLERRM.