Is there a way to return meaningful error codes working with external stored procedure?
When error occurs in external stored procedure then the value of SQLCode becomes non-zero and if not edited is returned to the user. The meaning of given SQLCode can be found in DBC.ErrorMsgs. For example for SQLCode 5628 we can use the following code:
where ErrorCode = 5628
Teradata returns one row:
5628 Column %FSTR not found in %VSTR.
How in external SP I can determine which %FSTR is not found in which %VSTR? How these names are returned when exception is generated?