Hi,
I have this SQL below.. I get div by 0 error. Can anyone help please?
case when sum(CASE WHEN tab1.col = 'R010' And tab2.col = '2015'
THEN tab3.MthValue ELSE 0 END)=0 then 0 ELSE Sum(CASE WHEN tab1.col = 'R010' And tab2.col = '2015'
THEN tab3.MthValue ELSE 0 END)-Sum(CASE WHEN tab1.col = 'R010' And tab2.col = '2015'
THEN tab3.MthValue ELSE 100 END)/Sum(CASE WHEN tab1.col = 'R010' And tab2.col = '2015'
THEN tab3.MthValue ELSE 0 END) end as '%'
Thank You
Veena M