title: increment date ORA - 00932. 00000 - "inconsistent datatypes: expected %s got %s"
body: <p>I have a defined date in my script</p>
  
  <pre><code>define REPORT_DATE = to_date('05112016','ddmmyyyy')
  </code></pre>
  
  <p>when I try to increment it</p>
  
  <pre><code>select *
  from STG_PREP_CHARGES_PLAN SPCP
  where &amp;REPORT_DATE + 1 &lt; SPCP.NEXT_CHARGE_DATE
  </code></pre>
  
  <p>I get ORA - 00932. 00000 -  "inconsistent datatypes: expected %s got %s"</p>
  
  <p>Is there a function like add_months, but for days?</p>
  
  <p>SPCP.NEXT_CHARGE_DATE is a date</p>
  
  <pre><code>desc STG_PREP_CHARGES_PLAN
  Name                   Null Type          
  ---------------------- ---- ------------- 
  NEXT_CHARGE_DATE            DATE          
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>It's strange. I changed the date to to_date('06112016','ddmmyyyy') and then back and it started working. Have no idea what it was.</p>
  
  <p>UPDATE2
  Found what the problem is. I just had to select all query before running it.</p>