If you want to generate dates since a certain date, you can use a recursive CTE:
with dates as (
select convert(date, '2020-01-01') as dte
union all
select dateadd(day, 1, dte)
from dates
where dte < convert(date, getdate())
)
select *
from dates
option (maxrecursion 0);
The results can be saved in a table. Or the CTE can be incorporated into another query.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…