Hi expert,I have an SQL Statement that perform a calculation.Upon running i have encountered an error that say divide by zero encountered. below is the codes that show this error.btw, upon checking the result of these sum case statement are both zero. thank you in advance.SUM(CASE WHEN t1.WRKCTRID IN ('xxx','vvv','ttt','ddd','ppp','lllll') THEN ISNULL(NULLIF(CAST(t1.FailedQty_B AS DECIMAL(10,2)),0),0) ELSE 0 END)/ SUM(CASE WHEN t1.WRKCTRID = 'xxx' THEN ISNULL(NULLIF(CAST(t1.Total_Touch_B AS DECIMAL(10,2)),0),0) ELSE 0 END) AS FTQ_Yield_B----ISNULL(SUM(CASE WHEN t1.WRKCTRID IN ('xxx','vvv','ttt','ddd','ppp','lllll') THEN NULLIF(CAST(t1.FailedQty_B AS DECIMAL(10,2)),0) ELSE 0 END)/ SUM(CASE WHEN t1.WRKCTRID = 'xxx' THEN ISNULL(NULLIF(CAST(t1.Total_Touch_B AS DECIMAL(10,2)),0),0) ELSE 0 END),0) AS FTQ_Yield_B