Just want to select all dates between cureent date and first day of month . I want to use fill all dates in a temp table
declare @temp table
(
ddate datetime
)
I have tried with with cte
and i don't want to use while loop becuase i want to avoid while in stored procedure .
For example as today is 11-oct-2012
so temp table should have 11 rows starting from 1-oct-2012
to 11-oct-2012