Using UDTs - OLE DB Provider for Teradata

OLE DB Provider for Teradata User Guide

Product
OLE DB Provider for Teradata
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2498
Product Category
Teradata Tools and Utilities

Using UDTs

Each UDT has an associated external type, which is always a predefined Teradata Database type. As the values of a UDT are transferred from Teradata Database to OLE DB Provider for Teradata, the database automatically converts the UDT values to the external type.

For example:

Assume that a table named EMPLOYEE exists, and that the table has a column named EmpSalary of type DOLLAR, where DOLLAR is a UDT with an associated external type of DECIMAL(15,2). Then, if an OLE DB consumer has OLE DB Provider for Teradata execute a command with text “SELECT EmpSalary FROM EMPLOYEE”, then the column in the resulting rowset object will be of type DBTYPE_NUMERIC, not DBTYPE_UDT.

Also, when sending values for a UDT type from OLE DB Provider for Teradata to Teradata Database, Teradata Database automatically converts the values from the external type.

While UDT values are transferred to and from Teradata Database using the external type, UDTs are visible as UDTs in the OLE DB Provider for Teradata schema rowsets.