Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Web Intelligence
Viewing all articles
Browse latest Browse all 5402

Div by 0 error - SQL server

$
0
0

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


Viewing all articles
Browse latest Browse all 5402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>