OVERLAPS Example 7 - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Consider the following table and query:

CREATE TABLE project
   (id INTEGER,
    analysis_phase PERIOD(DATE))
UNIQUE PRIMARY INDEX (id);
INSERT project (1, PERIOD(DATE'2010-06-21',DATE'2010-06-25'));
SELECT 'OVERLAPS'
FROM project
WHERE analysis_phase OVERLAPS 
      PERIOD(DATE'2010-06-24',NULL);

The SELECT statement returns an error because one of the operands of OVERLAP is a Period type with a Period expression specifying an explicit NULL.