title: Oracle11g numeric overflow in for loop
body: <p>I have a for loop in pl/sql function something like:</p>
  
  <pre><code>FOR i IN min..max LOOP
  </code></pre>
  
  <p>variables i, min, max are declared as <code>NUMERIC</code></p>
  
  <p>in my case min and max are ofen very large, but range itself is small, ie:</p>
  
  <pre><code>min = 3232236033
  max = 3232236286
  </code></pre>
  
  <p>as You see range is about ~256, but with this values oracle throws a numeric overflow error and I stuck on how to get it working.</p>
  
  <p>How I should iterate over those values?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>OK, I have a working answer, using of loop of max/min diff, but is it really not possible to loop through big values in oracle?</p>
  
  <p><strong>EDIT</strong> The error I retrieve is:</p>
  
  <pre><code>SQL Error: ORA-01426: nadmiar numeryczny
  ORA-06512: przy "PS.DHCP", linia 88
  01426. 00000 -  "numeric overflow"
  *Cause:    Evaluation of an value expression causes an overflow/underflow.
  *Action:   Reduce the operands.
  </code></pre>
  
  <p>Line 88 of code is:</p>
  
  <pre><code>FOR client_ip IN min_host..max_host
  </code></pre>
  
  <p>min_host, max_host, client_ip is a result of <code>inet_aton</code> (numeric representation of IP)</p>