How about this?
DECLARE @StartDate DATETIME --= '2010-11-22'
DECLARE @EndDate DATETIME --= '2010-12-22'
SET @StartDate = '2010-11-22'
SET @EndDate = '2010-12-22'
; WITH Tens (N) AS
(
SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
UNION ALL SELECT 1
),
Thousands (N) AS
(
SELECT T1.N FROM Tens T1 , Tens T2 , Tens T3
),
TallyOnTheFly (N) AS
(
SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) FROM Thousands
)
SELECT DATEADD(DD ,( N-1 ), @StartDate ) DateCol
FROM TallyOnTheFly
WHERE DATEDIFF(DD ,@StartDate , @EndDate) >= ( N - 1 )
You can extend the TallyOntheFly to any number of your wish 😉