Result Type - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.