16.20 - FNC_TblOpSetOutputColDef - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Purpose

Communicates the output columns of an output stream to the parser.

Syntax

void
FNC_TblOpSetOutputColDef(int                    streamno,
                         FNC_TblOpColumnDef_t  *coldefs);
int streamno
the output stream number.
FNC_TblOpColumnDef_t *coldefs
the columns definition.

For details about the FNC_TblOpColumnDef_t structure, see Table Operator Data Structures.

Usage Notes

If no contract function is specified, the parser sets the output columns as indicated by the RETURNS clause.

This function will error in the following cases:
  • If both the contract function and an explicit column definition list are specified.
  • The stream number is invalid.
  • coldefs include invalid data types, invalid character set, or coldef->length is invalid for the number of columns in coldef->num_columns.

Example Using FNC_TblOpSetOutputColDef

See C Table Operator for an example of how to use this function.