16.20 - C Table Operator - 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)

This example shows the C code for a table operator.

The required inputs for this aggregation operator are:
  • The input table (or table expression) specified in the FROM clause of the SELECT statement. For this example, we will use the following table and input:
    CREATE TABLE tab1 (A INTEGER,
                       B INTEGER,
                       C INTEGER,
                       D INTEGER);
    
    INSERT INTO tab1(1,2,3,4);
    INSERT INTO tab1(2,3,4,5);
  • Each aggregate is a Custom clause, such as SUM_AGG(c1, c2) and AVG_AGG(c3).