title: Display current month values based upon abbreviation (Oct) SQL Server
body: <p>I am currently dealing with a table that looks like this:</p>
  
  <pre><code>PersonID    Month
      1       Dec
      2       Jan
      3       Oct
      4       Oct
      5       Jan
      6       Feb
  </code></pre>
  
  <p>I want to select rows where the month is equal to today's month. So for example for this current month i want all the rows that are equal to October but obviously this appears as 'Oct'. Is there anyway i can achieve this?</p>
  
  <p>Desired output </p>
  
  <pre><code>PersonID    Month
      3       Oct
      4       Oct
  </code></pre>
  
  <p>I thought maybe something along the lines of </p>
  
  <pre><code>SELECT *,
  CASE WHEN Month = 'Oct'
  THEN '01-10-17'
  ELSE 'N/A' END AS [Date]
  
  FROM Person
  
  WHERE Month([Date]) = Month(getdate())
  </code></pre>
  
  <p>But im not sure this logic is that solid.</p>
  
  <p>SQL - <a href="http://sqlfiddle.com/#!9/a3f33/1" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/a3f33/1</a></p>