OVERLAPS Example 5 - 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

The NULL in the following example means the second datetime_expression has a start time of 2001-06-13 15:00:00 and a null end time.

SELECT 'OVERLAPS'
WHERE (TIMESTAMP '2001-06-12 10:00:00', TIMESTAMP '2001-06-15 08:00:00')
OVERLAPS (TIMESTAMP '2001-06-13 15:00:00', NULL);

Because the start time for the second expression falls within the TIMESTAMP interval defined by the first expression, the result is TRUE.