Anchored Interval Uses System-defined Business Calendar Set in the Session - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Vantage uses a system-defined business calendar set in the session for the anchored interval in an EXPAND ON clause.

In an anchor expansion, Vantage derives the BEGIN bound of the first expanded row from the business calendar set in the current session. The BEGIN bound of the first expanded row is derived from the YearBeginDate, WeekStart, and CalendarPeriod columns from the BusinessCalendarPattern table.

For example, a row has a period from 1-Jan-2008 to 31-May-2008, YearBeginDate is 15-Mar-2008, and CalendarPeriod is from 1-Jan-08 to 30-Oct-08. Expanding by anchor point MONTH_BEGIN produces the following rows. The MONTH_BEGIN value is derived from the YearBeginDate value, which is January 15 and, because the Calendar begins in January, the first month starts on January 15.
  1. 15-Jan-08 to 15-Feb-08
  2. 15-Feb-08 to 15-Mar-08
  3. 15-Mar-08 to 15-Apr-08
  4. 15-Apr-08 to 15-May-08