REPLACE VIEW UserInfo.Calendar_Date AS LOCK ROW FOR ACCESS
/* Developer: Daphne Hattingh
Apply the following Filter: Where MyDate = date
Example: Select * From UserInfo.Calendar_Date where MyDate = date */
select CAST( Calendar_date AS DATE FORMAT 'YYYYMMDD') AS MyDate, TO_CHAR(MyDate,'YYYY') AS MyYear, TO_CHAR(MyDate,'MM') AS MyMonth, TO_CHAR(MyDate,'DD') AS MyDay, MyYear||MyMonth as MyYYMM_Char, MyYear||MyMonth|| MyDay as MyYYMMDD_Char, cast(MyYYMM_Char as integer) as MyYYMM_Int, cast(MyYYMMDD_char as integer) as MyYYMMDD_Int from Sys_Calendar.CALENDARTMP ;