SQL Definition - 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ā„¢

Here is the SQL definition of a VARCHARUDT distinct UDT.

CREATE TYPE VARCHARUDT AS VARCHAR(20000) FINAL;

The table AggrDataTable defines a VARCHARUDT column.

CREATE TABLE AggrDataTable (aggrID int, aggrName varcharudt);

The following CREATE FUNCTION statement installs the aggregate function:

CREATE FUNCTION udf_agch002002udt  (parameter_1 VARCHARUDT)
   RETURNS VARCHARUDT   
   CLASS AGGREGATE (20000)
   LANGUAGE C  
   NO SQL
   EXTERNAL NAME 'CS!udf_agch002002udt!udf_agch002002udt.c'
   PARAMETER STYLE SQL;