title: select all date that is lesser than today
body: <p>I have a table (<code>mytable</code>) that contains:</p>
  
  <pre><code>id, date
  </code></pre>
  
  <p>and some rows (the Id is for the example):</p>
  
  <pre><code>4235          null
  3563   2013-11-27 08:02:53.917
  3143   2013-11-27 01:04:51.917
  1455          null
  5223   2013-11-26 08:02:53.917
  2123   2013-11-25 08:02:53.917
  </code></pre>
  
  <p>I want to select all the rows that their date before today or the date is null.</p>
  
  <p>so in my example, if I run the query on <code>2013-11-27</code> I want to get:</p>
  
  <pre><code>4235          null
  1455          null
  5223   2013-11-26 08:02:53.917
  2123   2013-11-25 08:02:53.917
  </code></pre>
  
  <p>I think to do it with:</p>
  
  <pre><code>select case when
  (
  (select DATEPART(yyyy,dailybudgetexceeded) from sensplit_commercial_goal where 
  commercialGoalId = 'dbe20d71-e304-4989-8524-5feef61d32a7') &gt;= YEAR(GETDATE()) 
  or...
  </code></pre>
  
  <p>but maybe there is a shorter way.</p>
  
  <p>any help appreciated!</p>