Re: How to Retrive Error message associated with SQLSTATE
I'm not aware of an automated way to do this with Teradata. You might need to build a mapping table of SQLSTATE to RDBMS error and then join that to the dbc.errormsgs table to get the message? Although errormsgs is generic and wouldn't give you specific DB or tables names for a given instance of an error. The Stored Procedure manual has a table of SQLSTATE/RDBMS error mappings in it.