Error: divisor is equal to zero, when using equation within a procedure
Posted on 2004-11-27
Please help. I get the ERROR message below:
ORA-01476:divisor is equal to zero
Whenever I try and run this SQL WITHIN a PL/SQL procedure:
INSERT INTO table2(ANSWER) SELECT (P1 + (((P2-P1)*(SRL-R1))/(R2-R1)))
But when I run the same SQL (with hard coded condition) from the SQL command line it works for all of the values in table 1 !!
How can this be and how can it be put right ? It must be run within a procedure.
Oh P1 P2 SRL R1 R2 are all of type float
Thanks in advance