Example: INSERT Using a PERIOD Value Constructor - Teradata Vantage - Analytics Database

SQL Data Manipulation Language

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-04-02
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantageā„¢

The following examples use tables t1 and t2, which are defined as follows:

     CREATE TABLE t1 (
       c1 INTEGER
       c2 PERIOD(DATE))
     UNIQUE PRIMARY INDEX (c1);
     CREATE TABLE t2 (
       a INTEGER
       b DATE
       c DATE)
     UNIQUE PRIMARY INDEX (a);

The following two INSERT requests both use a PERIOD value constructor:

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