この手順は、地域や言語に依存しません。
SET DATEFIRST 1
の最初の行に注意してください 。
SET DATEFIRST 1; -- First day of the week is set to monday
DECLARE @DateFrom DateTime ='20150601', @DateTo DateTime = '20150630' ;
WITH CTE(dt)
AS
(
SELECT @DateFrom
UNION ALL
SELECT DATEADD(d, 1, dt) FROM CTE
WHERE dt < @DateTo
)
SELECT dt FROM CTE where datepart ("dw", dt) = 1;