17.10 - Example: CONTAINED IN Query on an ANSI Valid-Time Table - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - ANSI Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1186-171K
Language
English (United States)

A CONTAINED IN query will return rows that were valid only within a specified period. Rows with valid-time periods that may start within the specified period, but continue beyond the period are not returned.

SELECT * 
FROM employee_vt 
FOR VALIDTIME CONTAINED IN (DATE’2004-01-01’,DATE’2005-12-31’);

 eid ename terms  job_start     job_end
---- ----- ----- ---------- -----------
1005 Alice  TW11 2004/12/01  2005/12/01
1003 SRK    TM02 2004/02/10  2005/02/09