17.10 - Return Values for SELECT or DELETE UDFs - 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)

SELECT and DELETE UDFs should return the following values in the result and corresponding indicator parameters. The return values are based on the data type and NULL option defined for the constraint object.

  • If the constraint data type is SMALLINT or BYTE(n) and the constraint does not allow nulls, then the valid return values are:
    Return Value Description
    'T' Indicates that the call passed the security policy. The SELECT or DELETE operation is performed.
    'F' Indicates that the call failed to pass the security policy. The SELECT or DELETE is not performed and the system will move to the next row.
  • If the constraint data type is SMALLINT or BYTE(n) and the constraint allows nulls, then the valid return values are:
    IF the Return Indicator Value is... AND the Return Value is... THEN...
    0 'T' the call passed the security policy. The SELECT or DELETE operation is performed.
    0 'F' the call failed to pass the security policy. The SELECT or DELETE operation is not performed and the system will move to the next row.
    The UDF cannot return -1 as the value for the return indicator parameter. This is an invalid result.