17.10 - Example: Creating a Sequenced View on a Temporal Table Using a Business Calendar Function - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Temporal Table Support

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

The following statement employs a business calendar function in an AS OF clause to define a view that shows insurance policies valid at the beginning of the current year.

CREATE VIEW ValidePoliciesOnJan1 AS
  VALIDTIME AS OF TD_YEAR_BEGIN(CURRENT_DATE) SELECT * FROM Policy;