Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to generate a monthly calendar view in Oracle

Maksim SkobeleuMar 16 2026

Hi everyone,

I'm trying to write a SQL query that generates a calendar for a specific month (e.g., October 2026). I want the output to look like a standard calendar grid with columns for each day of the week (Sun-Sat).

Ideally, the output should look something like this:

Plaintext

Sun | Mon | Tue | Wed | Thu | Fri | Sat
---------------------------------------
    |     |  1  |  2  |  3  |  4  |  5
 6  |  7  |  8  |  9  | 10  | 11  | 12
...			
This post has been answered by Solomon Yakobson on Mar 16 2026
Jump to Answer
Comments
Post Details
Added on Mar 16 2026
8 comments
172 views