title: Sort by Date in SQL
body: <p>I have a resources table, one of the fields is a date field with the Data Type of date.  I want to have to following output:</p>
  
  <p>Current month records (say May - year is not important)</p>
  
  <p>Then the following (again, assuming May is the current month)</p>
  
  <ul>
  <li>June Records</li>
  <li>July Records</li>
  <li>August Records</li>
  <li>September Records </li>
  <li>October Records</li>
  <li>November Records</li>
  <li>December Records</li>
  <li>January Records</li>
  <li>February Records</li>
  <li>March Records</li>
  <li>April Records</li>
  </ul>
  
  <p>Come June, June is the current month and then the order would be:</p>
  
  <ul>
  <li>July Records</li>
  <li>August Records</li>
  <li>...</li>
  </ul>
  
  <p>Here is my SQL...I don't know how to ORDER the output to achieve the desired order (5,6,7,8,9,10,11,12,1,2,3,4):</p>
  
  <pre><code>SELECT
    resource_id,
    resource_title,
    resource_summary,
    resource_category,
    resource_status,
    resource_date,
    DATEPART(month, resource_date) AS resource_month,
    DATEPART(day, resource_date) AS resource_day
  FROM dbo.resources
  WHERE (resource_category = N'Quotes')
    AND (resource_status &lt;&gt; N'Draft')
  </code></pre>
  
  <p>I found this possible solution for MySQL:</p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/2663234/i-need-unusual-ordering-mysql-results">I need unusual ordering mysql results</a></p>
  </blockquote>
  
  <p>but I'm missing something on my end.</p>