Example: Period Value Constructor - Analytics Database - Teradata Vantage

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantage™

In the following example, assume t1 is a table with an INTEGER column c1 and a PERIOD(DATE) column c2 and t2 is a table with an INTEGER column a and two DATE columns b and c.

This example shows the Period value constructor used in two INSERT statements.

INSERT INTO t1
  VALUES (1, PERIOD(DATE '2005-02-03', DATE '2006-02-04'));
INSERT INTO t1 SELECT a, PERIOD(b, c) FROM t2;