Fixed Result Row Specification - 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™

If the CREATE FUNCTION or REPLACE FUNCTION statement specifies a column list for the table function row result, then the table function is said to have a fixed result row specification. The number of result parameters in the table function parameter list matches the number of columns in the column list in the RETURNS TABLE clause of the CREATE FUNCTION or REPLACE FUNCTION statement.

Here is an example of a CREATE FUNCTION statement for a table function with a fixed result row specification:

CREATE FUNCTION getStoreData
  (FileToRead INTEGER)
RETURNS TABLE (StoreNo INTEGER, ItemNo INTEGER, QuantSold INTEGER)
LANGUAGE C
NO SQL
EXTERNAL NAME 'CS!getdata!udfsrc/gs1.c'
PARAMETER STYLE SQL;

In this example, the number of result parameters in the table function parameter list is three.