One way is to use CTE to look for next monday and then use the result in your where clause. Consider the following example
WITH NextDays (ActualDate, DayOfWeek) AS (
SELECT GETDATE(),
DATEPART(WEEKDAY, GETDATE())
UNION ALL
SELECT DATEADD(day, 1, ActualDate),
DATEPART(WEEKDAY, DATEADD(day, 1, ActualDate))
FROM NextDays nd
WHERE nd.ActualDate < GETDATE() + 8
),
NextMonday (DateForMonday) AS (
SELECT TOP 1
CAST(nd.ActualDate AS date)
FROM NextDays nd
WHERE nd.DayOfWeek = 2
ORDER BY nd.ActualDate
)
SELECT *
FROM Customers c,
NextMonday nm
WHERE c.DateOfBirth BETWEEN nm.DateForMonday AND DATEADD(day, 10, nm.DateForMonday)
Note:
- you need to set datefirst propertly, see
SET DATEFIRST (Transact-SQL) - SQL Server | Microsoft Docs[
^]
- also you need to change the query to start from tomorrow if this day will not be included, in case current day would be Monday.