May be this ids useful 4 u......manipulate this code according to your need
declare @fromDate Date,@toDate Date
set @fromDate='12-01-2006'
set @toDate='12-05-2006'
;WITH sample AS (
SELECT CAST(@fromDate AS DATETIME) AS Dates
UNION ALL
SELECT DATEADD(dd, 1, Dates)
FROM sample s
WHERE DATEADD(dd, 1, Dates) <= CAST(@toDate AS DATETIME))
select * from sample