phpSeptember 13, 2007 8:17 pm
If you have division operations in your sql, you make encounter divide by zero errors.
To avoid this type of errors, you may want to use the Oracle decode function.
For example instead of select fld1/fld2 from myTable use the following:
select decode(fld2,0,0, fld1/fld2) from myTable.
This is equivalent to the following:
if fld2 equals 0, select 0
else select fld1/fld2
