Divide by zero...

From: Mike Leahy <mgleahy(at)fes(dot)uwaterloo(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Divide by zero...
Date: 2003-09-30 13:26:19
Message-ID: 1064928379.3f79847bb8fdb@www.nexusmail.uwaterloo.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

All...

I have a query that calculates various using variables from a survey
database. As with any survey, there are many instantces of null values. I'm
wondering if there is any way to escape the error caused by dividing by zero
or null values. The specific message i get is:

ERROR: floating point exception! The last floating point operation either
exceeded legal ranges or was a divide by zero

Is there a simple trick that won't make my queries excessively complex?

Many thanks.

Mike

----------------------------------------
This mail sent through www.mywaterloo.ca

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-30 13:49:40 Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Previous Message Ian Harding 2003-09-30 13:07:37 Query FKey Constraint Table and Column Names