Sys_Calendar.CALENDAR_TD1310 - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
prb1610499325399.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantageā„¢
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