16.20 - Result 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

The data type of the LEAD or LAG function's returned values is the same as the specified value of value_expression. If default_value_expression and value_expression have different data types, Teradata recommends explicitly casting default_value_expression to the data type of value_expression.

In ANSI mode, an error occurs if default_value_expression and value_expression data types do not match.

In the Teradata Transaction (BTET) mode, if the data types do not match, the database attempts to cast the default_value_expression to the value_expression data type based on the internal casting rules. If this results in casting rule violations, an error message displays.