16.20 - Example: Using an IN List that Contains Multiple Columns with an Incompatible Data Type - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2020-03-25
dita:mapPath
xzf1512079057909.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
kby1472250656485

In this example, the star1p table is altered to contain a new column Q401Sales with a VARCHAR(20) data type. The Q101Sales column is an INTEGER data type, and the Q401Sales is VARCHAR.

The INTEGER and VARCHAR data types are not compatible.

SELECT *
FROM star1p UNPIVOT (measure_value  FOR  yr_qtr_measure IN
(Q101Sales, Q401Sales)) Tmp;

Error 9134 Failure in TD_Unpivot contract function. Error determining column type of value columns.