Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

replace divide by zero error with 0 in sql

#Replace the result of divide by zero with 0

SELECT COALESCE(dividend / NULLIF(divisor,0), 0) 
FROM sometable
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #divide #error #sql
ADD COMMENT
Topic
Name
8+8 =