Example - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™

Consider the following table definitions, where euro and us_dollar are UDTs:

CREATE TABLE euro_sales_table
   (euro_quarter INTEGER
   ,euro_region VARCHAR(20)
   ,euro_sales euro );
CREATE TABLE us_sales_table
   (us_quarter INTEGER
   ,us_region VARCHAR(20)
   ,us_sales us_dollar );

Assuming an appropriate cast definition exists for converting the euro UDT to a us_dollar UDT, the following statement performs a us_dollar UDT to euro UDT conversion:

INSERT INTO euro_sales_table
   SELECT us_quarter, us_region, CAST (us_sales AS euro) 
   FROM us_sales_table;