title: Banding a date range in oracle
body: <p>I am looking to break a row into month bands in Oracle 11.</p>
  
  <p>For instance, say I have schema:</p>
  
  <pre><code>CREATE TABLE MY_TABLE (
    A_FIELD VARCHAR2(45),
    START_DATE DATE,
    END_DATE DATE
  );
  </code></pre>
  
  <p>With an entry such as: <code>"foo", 1-1-2011, 1-1-2012</code></p>
  
  <p>Is there a way to query the table such that I get a result set like:</p>
  
  <pre><code>"foo", Jan-11
  "foo", Feb-11
  "foo", Mar-11
  "foo", Apr-11
  "foo", May-11
  .....
  "foo", Jan-12
  </code></pre>
  
  <p>I have been trying various methods with CONNECT BY LEVEL, MONTHS_BETWEEN, etc, but I can't seem to get it quite right.</p>
  
  <p>Thanks all for your help.</p>