title: Number of Weeks between Parameter Dates - Group by Week - SQL
body: <p>I have 2 parameter in my stored procedure @FromDate and @ToDate, I want to work out the number of weeks between @FromDate and @ToDate, @FromDate is always a Monday while @ToDate is always a Sunday but the dates could cover weeks, months etc.</p>
  
  <p>Currently I have DATEDIFF(WW, @FromDate, @ToDate)</p>
  
  <p>Which returns say 4 but I would like it to return 1,2,3 and 4 in 4 rows rather than just 1 row.</p>
  
  <p>What is the best way to achieve this?</p>