17.10 - Example Query - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
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;