C Scalar Function Using Dynamic UDTs | UFC Code Examples | Teradata Vantage - C Scalar Function Using Dynamic UDTs - 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™

This example shows how to write a UDF called add_int that handles a dynamic UDT input argument. The add_int UDF can handle a dynamic UDT that consists of any combination of the following attribute types:

The add_int UDF sums up the values of all of the attributes of the dynamic UDT (where attributes that are not numeric are expected to represent integers as strings) and returns the result.
  • BYTEINT
  • SMALLINT
  • INTEGER
  • CHAR
  • VARCHAR
  • CLOB