16.20 - Example Query - 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)

Consider the following data in the AggrDataTable table:

INSERT INTO AggrDataTable VALUES (1, 'george');
INSERT INTO AggrDataTable VALUES (1, 'carlos');
INSERT INTO AggrDataTable VALUES (2, 'annabelle');
INSERT INTO AggrDataTable VALUES (2, 'eva');

The following query performs the aggregation (concatenation) on the VARCHARUDT column:

SELECT aggrID, udf_agch002002udt(aggrName)
FROM AggrDataTable
GROUP BY aggrID;