Example: Using an IN List that Contains Multiple Columns with an Incompatible Data Type - Teradata Vantage - Analytics Database

SQL Functions, Expressions, and Predicates

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-22
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢

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;

Result:

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