Building Month Calendars Using SQL and PL/SQL
Each date value consists of the month and year value references. Therefore, it is often necessary to create reports referencing the defined granularity. For example, the evaluation of employee attendance, a project summary, or resource consumption is commonly associated with month precision. Moreover, individual activities can be bordered by the left and right borders of the duration frame. Thus, it can be necessary to get the visual form of the month in terms of individual day’s serial numbers, as well as weekday references. In the past, this had to be hardcoded. Nowadays, mostly pre-prepared visual components forming the calendar can be used.
Nevertheless, in our opinion, it is good to summarize the principles of building calendars and focus on weekday references with an emphasis on the calendar being defined by PL/SQL code, followed by the direct SQL statement approach. The weekdays can be placed either as columns or can be...