title: SQL query confusion for startdate and enddate
body: <p>I have a table(e.g. <em>tableA</em>) like this:</p>
  
  <pre>
  | Name  | Startdate  |  Enddate   |
  |---------------------------------|
  |  a    | 2012-07-01 | 2013-06-30 |
  |  b    | 2011-05-01 | 2012-04-30 |
  |  c    | 2010-01-01 | 2013-12-31 |
  |  d    | 2013-01-01 | 2014-12-31 |
  |  e    | 2011-07-01 | 2012-06-30 |
  </pre>
  
  <p>I want to get a <em>name</em> from the table who is active between <code>2012-05-01</code> and <code>2012-10-31</code>. From above table the result should be <strong><em>a,c and e</em></strong>.</p>
  
  <p>What I have done is as following:</p>
  
  <pre><code>SELECT Name FROM tableA WHERE startdate&lt;='2012-05-01' AND enddate&gt;='2012-10-31'
  </code></pre>
  
  <p>But I am not getting the correct result.</p>