17.00 - Sys_Calendar.CALENDAR_TD1310 - Teradata Database

Teradata Vantageā„¢ - Data Dictionary

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Administration
Programming Reference
featnum
B035-1092-170K
Sys_Calendar.CALENDAR_TD1310 can only be used for the 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 system-defined 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