title: Oracle SQL Retrieve Data From End of Month - 16th And 15th - 1st
body: <p>Alright so I am trying to retrieve data a field we will call DATE_OF_ENTRY and the field is like this.</p>
  
  <p>Example DATE_OF_ENTRY Data</p>
  
  <pre><code>28-NOV-15
  </code></pre>
  
  <p>So I need to use this field in a script that will be running twice a month to pull certain records. Basically when it's the 16th day of the current month I want all the records from the 1st-15th to be pulled up. When I run this script on the 1st of the next month I want all the records from the 16th-End of last month. </p>
  
  <p>What I am using now</p>
  
  <pre><code>WHERE ROUND(DATE_OF_ENTRY,'MM') = ROUND(sysdate-1,'MM') AND DATE_OF_ENTRY &lt; trunc(sysdate)
  </code></pre>
  
  <p>The problem with this statement is that it works on the 1st for the 16th to End of the last month, but on the 16th it gets data from the prior month still.  </p>
  
  <p>Any help is appreciated!</p>