title: SQL Server query dates
body: <p>I have this table <code>Table1</code>:</p>
  
  <pre><code>Room - StartDate - EndDate
  1    - 01/01/2013  05/01/2013
  1    - 14/01/2013  15/01/2013
  2    - 10/01/2013  13/01/2013
  </code></pre>
  
  <p>I want to show all the available 'Rooms' from 02/01/2013 to 03/01/2013</p>
  
  <p>I use:</p>
  
  <pre><code>select * 
  from Table1 
  where ('02/01/2013' NOT BETWEEN table1.stardate AND table1.enddate) 
     OR ('03/01/2013' NOT BETWEEN table1.startdate AND table1.enddate)
  </code></pre>
  
  <p>But the query result shows 2 (this is correct) <strong>but also 1, because of the last record</strong>.</p>
  
  <p>What can I do to show only 'Room 2'?</p>
  
  <p>thx</p>