tdr.SetError Function | R Table Operators | Teradata Vantage - 17.10 - tdr.SetError - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

Sets an error code and message to be displayed on the console when the query invoking the table operator is executed and an error is encountered.

Syntax

tdr.SetError(code,  message)

Syntax Elements

code
Parameter type: character

An error code.

message
Parameter type: character

An error message.

Example: Displaying an Error Code and Message

Suppose the data in the input table has invalid values. You can report the error using the following statement which prints out the error code "U1003" with message "Invalid Value for Division Number".

tdr.SetError("U1003", "Invalid Value for Division Number")