WIDTH BUCKET Rules - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
The following rules apply to WIDTH BUCKET:
  • If any argument is null, the result is null.
  • If partition_count <=0 or if partition_count > 2147483646, an error is returned to the requestor.
  • If lower_bound = upper_bound, an error is returned to the requestor.
  • If lower_bound < upper_bound, then the rules in the following table apply.
Relationship Result
value_expression < lower_bound 0.
value_expression >= lower_bound partition_count +1.

If the result cannot be represented by the data type specified for the result, then an error is returned.

Other the greatest exact numeric value with scale 0 that is less than or equal to the following expression.


  • If lower_bound > upper_bound, then the rules in the following table apply.
Relationship Result
value_expression > lower_bound 0.
value_expression <= lower_bound partition_count +1.

If the result cannot be represented by the data type specified for the result, then an error is returned.

Other the least exact numeric value with scale 0 that is less than or equal to the following expression.