C Table Operator | UFC Code Examples | Teradata Vantage - C Table Operator - 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™

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).