Bruce

   Try adding a where clause

 

   WHERE EvenCount > 0 AND EvenCount IS NOT NULL

 

Buddy

 

 

From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
Bruce Chitiea
Sent: Tuesday, May 3, 2016 4:03 PM
To: rbase-l@googlegroups.com
Subject: [RBASE-L] - Select Statement Divide by Zero Errors

 

All:

 

When EventCount is NULL or Zero, browsing produces Error #2553 - Divide by Zero.

 

Is there a cheap and cheerful way to deal with this WITHIN the select 
statement, short of introducing a host of (IFNULL variable constructs?

 

--Grossly Simplified Example

  SET ZERO ON
  CREATE TEMP VIEW DivideByZeroTest_tvw +
       ( ECount ,  +
         ECost ,  +
         EAvgCost ) AS +
  SELECT EventCount , +
         EventCost , +
         EventCost/EventCount +
    FROM BlahBlahBlah

 

--Browse of Death

  BROWSE * FROM DivideByZeroTest_tvw

 

 

Thanks much

 

Bruce Chitiea

SafeSectors, Inc.

909.238.9012 Mobile

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com 
<mailto:rbase-l+unsubscr...@googlegroups.com> .
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to