title: Select all dates between first day of month and current date
body: <p>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 </p>
  
  <pre><code>declare @temp table 
   (
     ddate datetime 
    ) 
  </code></pre>
  
  <p>I have tried with  <code>with cte</code>  and i don't want to use while loop becuase i want to avoid while in stored procedure . </p>
  
  <p>For example as today is <code>11-oct-2012</code> </p>
  
  <p>so temp table should have 11 rows starting from <code>1-oct-2012</code> to <code>11-oct-2012</code> </p>