Period Literals

ODBC Driver for Teradata® User Guide

brand
Teradata Tools and Utilities
prodname
ODBC Driver for Teradata
vrm_release
16.20
category
User Guide
featnum
B035-2526-108K

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.