Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Posts
    175

    Unanswered: Calculation in Query

    In a select query I want to select from a table where the osamt (calculated field) is not equal to 0.00
    In the query I have the following calculation:
    osamt: amount+tax-receiptamt
    In the criteria field I have the following: <>0

    The problem is that I am still getting records with 0 osamts.
    How can I get this to work where the query does not show zero amount. I ran some code through VB and noticed that osamt actually shows as 0.001 or -0.001.

    NEED HELP URGENTLY

  2. #2
    Join Date
    Feb 2004
    Posts
    199
    do you mean that you need supress rows where osamt>0.01 and <-0.01.
    you can use many ways to do this
    1)
    Where (osamt>=0.01) AND (osamt<=-0.01)
    2)
    Where round(osamt,2)<>0
    3)
    Where abs(osamt)>=0.01

    first one will be the faster, 2nd the slower
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  3. #3
    Join Date
    Sep 2001
    Posts
    175
    Thanks - will give it a try

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •