Example: Constant Reference Table Function - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

This example shows a constant reference table function equijoined to another table.

Note the following things about this example:
  • The table function is sent to all AMPs with the same constant data; therefore, it is a constant mode table function (see Teradata Vantage™ - SQL External Routine Programming , B035-1147 ).
  • The table function tudf1 produce all the rows selected.

    After that, the WHERE condition selects a subset from those produced. Only the qualifying rows are returned to the requestor.

           SELECT  *
           FROM tbl_1, TABLE(tudf1(28.8, 109)) AS tf2
           WHERE tbl_1.c1 = tf2.c1;