I have a for loop in pl/sql function something like:
FOR i IN min..max LOOP
variables i, min, max are declared as NUMERIC
in my case min and max are ofen very large, but range itself is small, ie:
min = 3232236033
max = 3232236286
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.
How I should iterate over those values?
EDIT
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?
EDIT The error I retrieve is:
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.
Line 88 of code is:
FOR client_ip IN min_host..max_host
min_host, max_host, client_ip is a result of inet_aton (numeric representation of IP)