Usage Notes - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢

Storage

A PERIOD(TIME[(n)]) is a fixed length data type and is saved as two TIME values.

Element Type Field Size in bytes Maximum Size in bytes in the row
TIME(n) 12 16

External Representation of PERIOD(TIME)

In field mode, Analytics Database returns PERIOD(TIME) data as character data.

Assume L is the maximum length of the formatted character string for the format associated with this Period data type. The resulting character string contains two strings representing the beginning and ending bounds of the period value expression, each up to length L , and each enclosed in apostrophes ('), separated by comma and a space (,), and then enclosed within a left and right parenthesis [( )]. Thus, the maximum length of the resulting character string is 2* L +8.

For modes other than field mode, and for input data, the external representation of PERIOD(TIME) consists of two consecutive time values. Each time value consists of multiple fields and returned in the specified order:
  • Second: 4-byte, signed integer flipped to client form. This integer represents the number of seconds as a scaled decimal (for example, 12.56 seconds is returned as 12560000).
  • Hour: 1 unsigned byte. This byte represents the number of hours.
  • Minute: 1 unsigned byte. This byte represents the number of minutes.

Restrictions

A primary index column or partitioning column cannot be a column that has a Period data type.