C Table Function | UFC Code Examples | Teradata Vantage - C Table Function - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

This example shows the C code for a table function. The example uses the following tables, data, and include file:

CREATE TABLE t (v INTEGER);

INSERT INTO t (1);
INSERT INTO t (2);
INSERT INTO t (3);
INSERT INTO t (4);
INSERT INTO t (5);
INSERT INTO t (6);
INSERT INTO t (7);
INSERT INTO t (8);
INSERT INTO t (9);
INSERT INTO t (10);

CREATE MULTISET GLOBAL TEMPORARY TRACE TABLE udftrace ,NO FALLBACK ,
     CHECKSUM = DEFAULT,
     NO LOG
     (
        Amp_number BYTE(2),
        Sequence INTEGER,
        Message VARCHAR(500)
     );

The phasetrace.h include file contains the following:

void trace (char *input_string);