Variable Mode Table Function Body | SQL External Routine Programming | Vantage - Variable Mode Table Function Body - 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ā„¢

This section provides guidelines on how to implement the body of a table function that the SELECT statement invokes using the columns from a derived table as input arguments.

For example, the following statement invokes table_function_2 using column_1 from the preceding derived table with the t1 correlation name:

SELECT *
FROM ( SELECT column_1
       FROM table_1
       WHERE column_2 > 65 ) AS t1,
     TABLE (table_function_2(t1.column_1)) AS t2 (c1, c2, c3)
WHERE t1.column_3 = t2.c3;
Although this section discusses how to implement a table function that only handles variable input arguments, you can design a table function that can handle constant and variable input arguments. For more information on how to implement a constant mode table function, see Constant Mode Table Function Body.