The maximum recursion 100 has been exhausted
问题 When I run this query I am getting error when I increase the date to be above months with calender_cte as ( select convert(date, '2019-01-01') as startdate, convert(date, '2019-12-31') as enddate union all select dateadd(day, 1, startdate), enddate from calender_cte cc where startdate < enddate ) SELECT DATEADD (week, datediff(week, 0, cc.StartDate), -1) as 'WeekOf', DATEADD (week, datediff(week, 0, cc.StartDate), +5) as 'to' --ISNULL(DATEPART(wk, Inter.StartDate), 0) as 'WeekNumber' FROM