C Scalar Function Using Dynamic UDTs | UFC Code Examples | Teradata Vantage - C Scalar Function Using Dynamic UDTs - 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
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
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