16.20 - Sys_Calendar.CALENDAR_TD1310 - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Data Dictionary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
zzu1512081120577.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
Sys_Calendar.CALENDAR_TD1310 can only be used for the Teradata system-defined calendar. If you try to use it when the session calendar is ISO or COMPATIBLE, the returned values will not be valid because they will always be from the Teradata calendar.

The current versions (Sys_Calendar.CALENDAR and Sys_Calendar.CALENDAR_TD_ISO_COMPATIBLE) use embedded services system functions to compute some column values. The Sys_Calendar.CALENDAR_TD1310 version computes all column values using arithmetic, which generally takes less time than computing values using UDFs.

To use the legacy TD1310 version of the view, replace the definition of Sys_Calendar.CALENDAR with the definition of Sys_Calendar.CALENDAR_TD1310. Follow these steps:

  1. Use this statement to view the definition of the Sys_Calendar.Calendar_TD1310 version:
    	SHOW VIEW Sys_Calendar.Calendar_TD1310;
  2. Use REPLACE to replace the definition of Sys_Calendar.CALENDAR with the definition of the Sys_Calendar.CALENDAR_TD1310 version.

After you redefine the current version, it no longer uses embedded services system functions to compute column values for the following columns:

  • day_of_month
  • weekday_of_month
  • month_of_quarter
  • month_of_year
  • quarter_of_year
  • year_of_calendar