Simply select all dates between the confirmation date and the first day of the month. I want to use filling all dates in temp table
declare @temp table ( ddate datetime )
I tried with with cte and I do not want to use while loop because I want to avoid during the stored procedure.
For example, today is 11-oct-2012
therefore, the temp table should have 11 rows, starting from 1-oct-2012 to 11-oct-2012
source share