Example Query - 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™

Assume that there is a table ByteIntTable defined as follows:

SELECT * FROM ByteIntTable ORDER BY 1; 

Result:

   *** Query completed. 6 rows found. 3 columns returned.
   *** Total elapsed time was 1 second.

   RowNumber  ByteIntColumn  Remark
 -----------  -------------  --------------------
           1              1  Nominal Value
           2           -128  Lower Limit
           3            127  Upper Limit
           4              0  Zero Value
           5              ?  NULL Value
           6             50  Character Literal

The following is a sample query that calls the AggFncWAnytype function.

SELECT  (AggFncWAnytype (ByteIntColumn) RETURNS INT)
FROM ByteIntTable ORDER BY 1;

The output from the query is:

AggFncWAnytype(1)
-----------------
               10