Avoid divide zero in the where clause

From: culam (culam_at_discussions.microsoft.com)
Date: 06/25/04


Date: Fri, 25 Jun 2004 16:44:01 -0700

Hi,
I am trying to run the query below and it boomed when B = 0.
How would I rewrite this query for it to work.
Basically I want to exclude if A or B equal zero.

SELECT A, B, A/B
FROM TABLE1
WHERE A <> 0
      AND B <> 0
      AND A/B >= .5

Thanks in Advance,
Culam



Relevant Pages

  • Re: Functions and Relations
    ... it doesn't rewrite the query to ... It does not rewrite but it is not what you asked is it? ... and functions are predicates" perspective. ...
    (comp.databases.theory)
  • Re: Using Columns in a Crosstab Query as fields in another query
    ... What I'd like to do is somehow set it up so that the query ... > I'm not exactly sure what you want but consider the Orders and Customers ... >> bonus for them based on their square footage in the last five shows. ... >> However, this requires me to rewrite the bonus query every year, as the ...
    (microsoft.public.access.queries)
  • screen scraping
    ... scrape some web pages .I was wondering if i can ... rewrite this app in ASP.NET ... display the result list from the web page based on the query ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Search form with Passthrough query
    ... Since you're dealing with a pass-through query, you have to rewrite the SQL ... form controls. ...
    (microsoft.public.access.formscoding)
  • .Net Query rewrites itself?
    ... from table1 ... Visual Studio decides by itself to rewrite the query as: ... The rewritten query no longer works. ...
    (microsoft.public.data.ado)