title: Monthwise data in SQL server
body: <p>I have small doubt in SQL server. Please tell me how to display month wise data to solve this issue in SQL server.
  table data look like below:</p>
  
  <p>Month datatype is <code>varchar(20)</code> and id is <code>int</code>. </p>
  
  <p>table: months</p>
  
  <pre><code>month     |id
  April     |1
  January   |2
  March     |3
  Feburary  |4
  August    |7
  December  |5
  May   |6
  June      |2
  July      |3
  August    |NULL
  September |2
  Octomber  |1
  November  |3
  June      |8
  </code></pre>
  
  <p>Base on this data I want output like below:</p>
  
  <pre><code>month      |id
  January    |2
  Feburary   |4
  March      |3
  April      |1
  May    |6
  June       |2
  June       |8
  July       |3
  August     |NULL
  August     |7
  September  |2
  Octomber   |1
  November   |3
  December   |5
  </code></pre>
  
  <p>And I've tried like below query:</p>
  
  <pre><code>select * 
  from  months   
  order by datepart(mm,[month]+ ' 01 2010'),id
  </code></pre>
  
  <p>But it show error like: </p>
  
  <blockquote>
    <p>msg 241, Level 16, State 1, Line 1 Conversion failed when converting
    date and/or time from character string.</p>
  </blockquote>
  
  <p>Please tell me, how to solve this issue in SQL server? </p>