Saturday, October 30, 2021

ORA-01476: divisor is equal to zero

select 
 
'&field1' field1,
'&field2' field2,
case 
    when '&field1' = 0 then 0
    when '&field1' != 0 then (('&field1'/'&field2')*100) 
end zero1_,
decode('&field2',0,0,(('&field1'/'&field2')*100)) zero2_,
decode('&field2',0,null,(('&field1'/'&field2')*100)) zero3_ 

from dual 

No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...