SQLSTATE vs. SQLCODE, exception handling
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


SQLSTATE vs. SQLCODE, exception handling Expand / Collapse
Author
Message
Posted 8/31/2006 12:36:02 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/12/2006 3:03:00 PM
Posts: 1, Visits: 1
I am trying to develop a standardized error handling mechanism for Teradata stored procedures.
Coming from the Oracle world I am quite underwhelmed by the exception/error handling in Teradata.
The solution I have come up with is essentially to have every stored procedure catch any exception log the error to the database then force a divide by zero exception. If I just exit without forcing an exception, the calling procedure will just continue ...
Has someone devised a better solution? Can I get the text of the original error message from the stored procedure, or are SQLCODE and SQLSTATE my only clues?
Any help would be appreciated!
Thanks!


Morten Tangaa
Post #5039
Posted 9/25/2009 3:17:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/5/2009 6:08:01 AM
Posts: 6, Visits: 25
Lookup on DBC.ErrorMsgs table to get the description of a error code (SQLCODE) you get.

Regards,
Dinesh
Post #16934
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 9:50am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.078. 7 queries. Compression Disabled.