Restrictions

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

If CASE_N is used in a PARTITION BY phrase, it:

  • Can specify a maximum of 65533 conditions (unless it is part of a larger partitioning expression)
  • Must not contain the system-derived columns PARTITION or PARTITION#L1 through PARTITION#L15
  • Must not use Period data types, but can use the following:
    • BEGIN bound function for which input is a Period data type column and not a Period expression.
    • END bound function for which input is a Period data type column and not a Period expression.
    • IS [NOT] UNTIL_CHANGED.
    • IS [NOT] UNTIL_CLOSED.

If CASE_N is used in a partitioning expression for a multilevel PPI, it must define at least two partitions.

Note that partition elimination for queries is often limited to literal or using value equality conditions on the partitioning columns, and the Optimizer may not eliminate some partitions when it possibly could. Also, evaluating a complex CASE_N may be costly in terms of CPU cycles and the overhead of CASE_N may cause the table header to be excessively large.