Example: Creating a Sequenced View on a Temporal Table Using a Business Calendar Function - Analytics Database - Teradata Vantage

Temporal Table Support

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
eud1628112402879.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
fif1472244754791
lifecycle
latest
Product Category
Teradata Vantage™

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;