title: SHOW ALL Dates data between two dates; if no row exists for particular date then show zero in all columns
body: <p>I want to show all dates between two dates when there is  any date data missing then its should show zero in val column . </p>
  
  <pre><code>declare @temp table (
  id int identity(1,1) not null,
  CDate smalldatetime ,
  val int
  )
  </code></pre>
  
  <p>INSERT STATEMENT FOR DATA TO CHECK </p>
  
  <pre><code>insert into @temp select '10/2/2012',1
  insert into @temp select '10/3/2012',1
  insert into @temp select '10/5/2012',1
  insert into @temp select '10/7/2012',2
  insert into @temp select '10/9/2012',2
  insert into @temp select '10/10/2012',2
  insert into @temp select '10/13/2012',2
  insert into @temp select '10/15/2012',2
  </code></pre>
  
  <p>Retrieve records between first day of month and today </p>
  
  <pre><code>select * from @temp where CDate between '10/01/2012' AND '10/15/2012'
  </code></pre>
  
  <p>As i run this query its show me all data between these two dates but i want to also include missing dates with <code>val=0</code> </p>
  
  <p><a href="http://www.sqlfiddle.com/#!3/268dc/1" rel="noreferrer">SQL FIDDLE WITH SAMPLE DATA </a></p>