Status Variable Values | Teradata Vantage - Status Variable Values - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
xqq1557098602407.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantage™

On completion of a handler action, status variables are set to the values indicated by the following table:

Status Variable Status Code
SQLSTATE '00000'
SQLCODE 0
ACTIVITY_COUNT 0

These values are returned only if the handler is of CONTINUE type. In the case of EXIT handler, control exits the compound statement in which the condition is raised.

If the evaluation of an expression within a stored procedure raises an exception or completion condition, then the values for the status variables SQLSTATE, SQLCODE, and ACTIVITY_COUNT are all set to values corresponding to the particular warning, error or failure code that the Teradata Database returned. An example is a divide-by-zero condition.

Successful evaluation of an expression does not raise a completion condition.