Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> calculated fields and divide by zero

calculated fields and divide by zero

From: Kevin Skaalrud <kevin_skaalrud_at_neptune.serca.com>
Date: Tue, 21 Jul 1998 10:15:58 -0700
Message-ID: <35B4CCCE.C4F7BBB2@neptune.serca.com>


Thanks to Thomas Kyte for sovling my this year vs last year query.

My next problem is this: when I try to calculate GP%, say, (sales-margin)/sales, if sales is zero oracle aborts the query with a divide by zero error.

Any thoughts on how to avoid this behaviour. I would prefer to see INF or 0 returned instead of abend on the query.

Kevin Skaalrud Received on Tue Jul 21 1998 - 12:15:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US