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

SQL External Routine Programming

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

Purpose

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)
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")