存储过程:return 一周的前五天

Stored procedure : return first five days of the week

我想将一个日期传递给我的存储过程,这可以是任何日期:

2022-04-18

如果可能的话,我如何才能return一周的接下来的 4 天排除周末,但这不是必需的。

预期输出:

2022-04-18
2022-04-19
2022-04-20
2022-04-21
2022-04-22
CREATE procedure spDateMessing(@d as date)
as
with cte as
(
    select n from (values(0),(1),(2),(3),(4)) as t(n)
)
select n,cast(DATEADD(D,n,@d) as date) as Date_ from cte