SQLTeam.com | Weblogs | Forums

Calendar Table or View in SQL database with 10-Day Gruping and Merged Computed Column

Hy all,
I am not a programmer.
I need to create a calendar table or view in my database with 10-days grouping and then merging Year, Month and 10DaysGroup.
Date range for Calendar must be variable (Changeable by me).
10-Day Group formula = [Date] 1 to 10 = 1, [Date] 11 to 20 =2, [Date] 21 to Last date of month = 3
Year-Month-TenDayGroup Formula = [Year]&"-"&]Month Number]&"-"&[TenDay Group].
I will be grateful for help.

hope this link helps

https://www.sqlshack.com/designing-a-calendar-table/

1 Like