title: Checking if a given date fits between a range of dates
body: <p>If I have 2 date columns in a table, <code>startDate</code> and <code>endDate</code>.  How do I return rows where a given date fits between those 2 dates?  For example:</p>
  
  <p>If the given date is <code>2012-10-25</code></p>
  
  <p>It should return the following rows</p>
  
  <pre><code>startDate   -   endDate
  2012-10-25  -   2012-10-25
  2011-09-10  -   2013-11-15
  2012-10-20  -   2012-10-25
  2012-10-23  -   2012-10-28
  2012-09-14  -   2012-10-28
  </code></pre>
  
  <p>from the following rows:</p>
  
  <pre><code>startDate   -   endDate
  2012-10-25  -   2012-10-25
  2011-09-10  -   2013-11-15
  2012-01-11  -   2012-10-11
  2012-10-20  -   2012-10-25
  2012-04-15  -   2012-04-16
  2012-05-20  -   2012-05-25
  2012-12-01  -   2012-12-10
  2012-10-23  -   2012-10-28
  2012-09-14  -   2012-10-28
  2012-11-13  -   2012-12-15
  </code></pre>
  
  <p>Is this possible with sql?</p>
  
  <p>I am using sql server 2008.</p>