title: How to manage complex sorting in SQL?
body: <p>I need to have date sorting  with the partial dates. I have a table with the following columns.</p>
  
  <pre><code>Day     Month   Year
  --      ----    -----
  NULL    03      1990
  26      10      1856
  03      07      Null
  31      NULL    2018
  NULL    NULL    NULL 
  </code></pre>
  
  <p>I have a grid in which One of the column is Date where I am combining the above three columns and displays the dates.</p>
  
  <p>Now I want sorting on this date column in the grid. The sort order of the dates should be like following :</p>
  
  <pre><code>[blank date]
  22 [day]
  March
  April 12
  May
  July 29
  August
  September
  September 14
  October
  1948
  October 1948
  October 1 1948
  July 1976
  1977
  July 1977
  July 23 1977
  December 1981
  December 29 1981
  </code></pre>
  
  <p>I have tried various ways to achieve this. But I am not able to get the desired result. Following are some of the ways I have applied.</p>
  
  <p>I have tried sorting by creating the stored procedure in which I am creating the whole date by combining 3 columns and converting them in standard date formats and comparing the values. I have also tried by creating the computed property in the model and sorting them accordingly.</p>
  
  <p>How can I do this in SQL?</p>