Example Query - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Assume that there is a table ByteIntTable defined as follows:

SELECT * FROM ByteIntTable ORDER BY 1; 

   *** 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