I have a table called DIM-month, containing information about months. It contains the next columns.
Month-key
Year
Month-number
Month-name
I also have a table DIM-day. It contains the next columns.
Day-key
Date
Month-key
Weekend-indication
Holiday-indication
Now I added two columns to DIM-month.
Number-weekend-days (this is the aggregation for a specific month of number of records in DIM-day where weekend-indication = Y)
Number-holiday-days (this is the aggregation for a specific month of number of records in DIM-day where holiday-indication = Y)
How do I update these two columns for every row, every month in DIM-month without using a cursor (in for instance a Cobol program)?
So in a single SQL?