DECLARE @lowInclusive Date = GETUTCDATE() DECLARE @highInclusive Date = DATEADD(DAY, 30, @lowInclusive) -- Declare a common table expression ;WITH generator AS ( -- In the base case, just select our first number as a row SELECT d FROM (VALUES(@lowInclusive)) AS base(d) UNION ALL -- Now select recursively from the common table until we reach our high number SELECT DATEADD(DAY, 1, d) FROM generator WHERE d < @highInclusive ) SELECT * FROM generator