diagnostic statement
A SIGNAL, RESIGNAL, or GET DIAGNOSTICS statement. For details, see Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 .
You can specify these options for diagnostic statements.
- SIGNAL
- Keyword introducing the SIGNAL SQL procedure diagnostic statement. See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 for details.
- condition_name
- Name of a variable declared to handle a condition within an SQL procedure.
- RESIGNAL
- Keyword introducing the RESIGNAL SQL procedure diagnostic statement.See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 for details.
- condition_name
- Name of a variable declared to handle a condition within an SQL procedure.
- SQLSTATE_code
- Value for an SQLSTATE to be assigned to RETURNED_SQLSTATE in the Condition Area.
- condition_information
- One of the field names from the Condition Area of the Diagnostics Area.
- value
- Text or numeric value, as appropriate, to be assigned to the specified condition information name.
- GET DIAGNOSTICS
- Keywords introducing the GET DIAGNOSTICS SQL procedure diagnostic statement.See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 for details.
- parameter_name
- Parameter whose value is set to the value contained in statement_information_item.
- variable_name
- Variable whose value is set to the value contained in statement_information_item.
- statement_information_item
- One of the field names from the Statement Area of the Diagnostics Area. See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 for details.
- EXCEPTION
- A language element that indicates to return information from the Condition Area of the Diagnostics Area.
- condition_number
- Number, parameter, or variable that resolves to the number of the Condition Area from which information is to be retrieved.
- parameter_name
- variable_name
- An output parameter or variable to which the condition_information_item retrieved from the specified Condition Area is assigned.
- condition_information_item
- Name of the Condition Area field from which condition information is to be retrieved. See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 for a list of the valid condition information item names.