Importing and Exporting Values into a UDT Column - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Importing and Exporting Values into a UDT Column

PP2‑based application programs can import and export values into tables that contain UDT columns. Write the embedded SQL host program as if the columns containing the UDTs contained the external types associated with the UDTs.

When the generated application program is run, it inserts values into the UDT columns. Then Teradata Database converts the UDT data from the external type to UDT internal format.

Define host variables to receive the UDT values using types that are compatible to the external types associated with the UDTs. When the select‑list of a SELECT statement contains a UDT expression, the Teradata Database server automatically converts the UDT data to its external type before returning the data to the client system. PP2 converts the data from this external type to the appropriate client format, provided the types are compatible.