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
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ā„¢

Assume the following query is executed on the employee table where period1 and period2 are PERIOD(DATE) columns:

SELECT * FROM employee WHERE period2 MEETS period1; 
ename period1 period2
Adams ('2005-02-03', '2006-02-03') ('2005-02-03', '2006-02-03')
Mary ('2005-04-02', '2006-01-03') ('2005-02-03', '2006-02-03')
Jones ('2004-01-02', '2004-03-05') ('2004-03-05', '2004-10-07')
Randy ('2004-01-02', '2004-03-05') ('2004-03-07', '2004-10-07')
Simon ? ('2005-02-03', '2005-07-27')

The result is:

ename period1 period2
Jones ('2004-01-02','2004-03-05') ('2004-03-05', '2004-10-07')