title: SQL Server: How to order by date, if the date is < GetDate()
body: <p>Here's an interesting one... hope I can explain it well...</p>
  
  <p>I have a collection of competitions in a single table in my SQL Server DB. I'm doing a full text search over them, which works fine. However, some of the competitions are closed, and I want these closed comps to show up after the open comps, while still respecting the rank we get from full text search.</p>
  
  <p>So if I had an IsOpen bit feild, I would them ordered by </p>
  
  <pre><code>ORDER BY IsOpen DESC, KEY_TBL.Rank DESC
  </code></pre>
  
  <p>Now the problem is I don't have an IsOpen bit field. Instead, I have a ClosedDate field, which is a datetime.</p>
  
  <p>So What I really need to do is something like:</p>
  
  <pre><code>ORDER BY (ClosingDate &lt; GetDate()) ASC, KEY_TBL.Rank DESC
  </code></pre>
  
  <p>Anyone know how to do this?</p>
  
  <p>Any ideas would be great! Thanks in advance.</p>
  
  <p>-Ev</p>