title: SQL Server - Duplicate rows and add date iterator column between two date values
body: <p>I have a table, with types varchar, varchar, date, and date:</p>
  
  <pre><code>NAME | ID   | FROM       | THRU
  Bob  | A123 | 10/30/2010 | 11/2/2010
  Bob  | B567 | 10/30/2010 | 11/2/2010
  </code></pre>
  
  <p>I want to add a Date of Service (DOS) column that duplicates the rows and iterates for each day between, and including, the FROM and THRU dates. The finished table should look like this:</p>
  
  <pre><code>NAME | ID   | FROM       | THRU       | DOS
  Bob  | A123 | 10/30/2010 | 11/02/2010 | 10/30/2010
  Bob  | A123 | 10/30/2010 | 11/02/2010 | 10/31/2010
  Bob  | A123 | 10/30/2010 | 11/02/2010 | 11/01/2010
  Bob  | A123 | 10/30/2010 | 11/02/2010 | 11/02/2010
  Bob  | B567 | 10/30/2010 | 11/02/2010 | 10/30/2010
  Bob  | B567 | 10/30/2010 | 11/02/2010 | 10/31/2010
  Bob  | B567 | 10/30/2010 | 11/02/2010 | 11/01/2010
  Bob  | B567 | 10/30/2010 | 11/02/2010 | 11/02/2010
  </code></pre>
  
  <p>I saw another answer that used cte but did not retain the original date values and add a DOS column. How could I accomplish this in SQL Server?</p>