Period Literals - ODBC Driver for Teradata

ODBC Driver for Teradata User Guide

Product
ODBC Driver for Teradata
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities

A Period literal is used to specify a period constant. It has the form of the PERIOD keyword followed by a quote string in a specific format. The element type of a period literal is derived from the format of the DateTime values specified in the quoted string. The general format of period literals is:

PERIOD ‘(element1,element2)’

Examples:

Date literal: PERIOD ‘(2005-02-03, 2006-02-04)’

Time literal: PERIOD ‘(12:12:12.340000, 13:12:12.340000)’

Note that the character representation of a period value from the database includes single quotes around the elements and can therefore not be directly used in the construction of a literal.