Example - 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
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantage™

If we assume that the employee table, created by the following SQL statement:

CREATE MULTISET TABLE employee(
 id INTEGER,
 name VARCHAR(50),
 dept INTEGER,
 tt PERIOD(TIMESTAMP(6)WITH TIME ZONE) NOT NULL AS TRANSACTIONTIME
 )
 PRIMARY INDEX(id);

contains the following row, a real period:

INSERT INTO employee(102, 'John', 222);

The following SELECT statement:

SELECT * FROM employee WHERE END(tt) IS UNTIL_CLOSED;

returns:

id     name   dept
--------------------
  102   John    222