Argument Types and Rules - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantage™

Refer to the following table for rules regarding WIDTH_BUCKET arguments.

If an argument cannot be implicitly converted to an acceptable type, an error is reported. For more information, see Teradata Vantage™ - Data Types and Literals, B035-1143.

Data Type Rules
Numeric WIDTH_BUCKET accepts all numeric data types as arguments. The arguments value_expression, lower_bound, and upper_bound are converted to REAL before processing. The partition_count argument is converted to INTEGER before processing.
Character WIDTH_BUCKET accepts character strings that represent numeric values, and converts the character strings to the appropriate numeric type.
  • TIME, TIMESTAMP, or Period
  • INTERVAL
  • BYTE or VARBYTE
  • BLOB or CLOB
  • CHARACTER or VARCHAR if the server character set is GRAPHIC
WIDTH_BUCKET does not accept these types of arguments.
UDT
  • The UDT must have an implicit cast to any of the following predefined types:

    Numeric

    Character

    DATE

    To define an implicit cast for a UDT, use the CREATE CAST statement and specify the AS ASSIGNMENT clause. For more information, see Teradata Vantage™ - Data Types and Literals, B035-1143.

  • Implicit type conversion of UDTs for system operators and functions, including WIDTH_BUCKET, is a Teradata extension to the ANSI SQL standard. To disable this extension, set the DisableUDTImplCastForSysFuncOp field of the DBS Control Record to TRUE. For details, see Teradata Vantage™ - Database Utilities, B035-1102.