15.10 - Period Datatypes - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

PP2 supports period datatypes. A period datatype is a datatype with two values that represent the start and end of a duration of time. The value that designates the beginning of the time period is included in the time span. The value that designates the end of the time period is not included in the time span. For example, a time period from February 1, 2006 to
February 10, 2006 is nine days. The period includes February 1, 2006 and extends to, but does not include, February 10, 2006.

See SQL Stored Procedures and Embedded SQL (B035‑1148) for more information on period datatypes.

The period types are:

  • PERIOD(DATE)
  • PERIOD(TIME)
  • PERIOD(TIME WITH TIMEZONE)
  • PERIOD(TIMESTAMP)
  • PERIOD(TIMESTAMP WITH TIMEZONE)
  • Any of these period datatypes can be used to insert data into, or retrieve data from, the Teradata Database (for example, using INSERT or SELECT). The values returned from the database server (for example, using SELECT) are in the format described in the next sections.