Return Values for SELECT or DELETE UDFs - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.