title: (sql server 2005) How to determine the WEEK number starting from GETDATE()
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/348880/getting-week-number-off-a-date-in-ms-sql-server-2005">Getting week number off a date in MS SQL Server 2005?</a>  </p>
  </blockquote>
  
  
  
  <p>Please suppose (i am in Italy) that all the weeks start with <code>Monday</code> and end with <code>Sunday</code>.</p>
  
  <p>I would like to write a scalar valued function that determines the <code>number of the week</code> with reference to <code>GETDATE()</code></p>
  
  <p>Thank you in advance for your kind cooperation.</p>
  
  <p>PLEASE PAY ATTENTION TO THIS: The SELECT has to be INDIPENDENT from the SET DATEFIRST command!!</p>