Create View before with or use directly

WHERE EventCosts OR EventCount  > 0

Fritz

 

Von: [email protected] [mailto:[email protected]] Im Auftrag von 
Bruce Chitiea
Gesendet: Dienstag, 3. Mai 2016 22:03
An: [email protected]
Betreff: [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 [email protected].
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to