title: How to generate week ranges for a year in SQL server 2005?
body: <p>I have to insert  <code>YEAR  WEEKNUMBER   STARTDATE   ENDDATE</code>  values to a datatable (say <code>weekrange</code>), if I pass 2011 as year.</p>
  
  <p>Week range starts at <code>2011-03-28</code> to <code>2011-04-03</code>  (because in my database 2010 last week range ends with <code>2011-03-27</code>)</p>
  
  <p>Like this I have to generate for 52 weeks.</p>
  
  <p>I want to write a stored procedure, that takes only year as parameter. with this year I have to generate week ranges and insert into my table as shown above.</p>
  
  <p>How can I do this ? </p>
  
  <p>Regards, 
  jn </p>