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.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
vqj1592443206677.ditamap
dita:ditavalPath
vqj1592443206677.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantageā„¢

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

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 system returned. An example is a divide-by-zero condition.

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