16.20 - EACH range_size - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Advanced SQL Engine
Teradata Database
Release Number
Release Date
March 2019
Content Type
Programming Reference
Publication ID
English (United States)

A literal or literal expression with a value greater than zero.

A range that specifies an EACH phrase is equivalent to a series of ranges, where the first range in the series starts at start_expression, and subsequent ranges start at start_expression + (range_size * n), where n starts at one and increments by one while start_expression + (range_size * n) is less than or equal to end_expression, or less than the next start_expression in the list of ranges.

For DATE types, the calculation of valid dates in subsequent ranges uses ADD_MONTHS instead of the + arithmetic operator.

The data type of range_size must be compatible for adding to test_expression.

If the data type of test_expression is a character type (CHAR, VARCHAR, GRAPHIC or VARGRAPHIC), you cannot specify the EACH phrase.