Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> calculated fields and divide by zero
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