Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Help (2000)

    I am having difficulties with my query. My database is attached. You can see where the query is not adding the numbers correctly because of the duplicate values in the REQ_HISTORY table. Can anyone show me how to get these values to correctly add up?

    Thanks!
    Kindra
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Help (2000)

    Can you indicate what the result of the query should be in your opinion, and how this result is calculated?

  3. #3
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Help (2000)

    Okay, what you are trying to do is a little confusing. First, are you trying to total the number of hours by Code alone, or by Code and ID? By code alone, that is where you are getting the jumble of 6020 for both ID 1 and 2, and you are getting ID 1 twice, because it is in the REQ_HISTORY table twice for code 6020. To show only one item from the REQ_HISTORY table, you'll need another field, either a date/time or Yes/no, to show which is the latest or current record to use for the last field.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Query Help (2000)

    Question reposted in new thread <post#=329216>post 329216</post#>. To avoid confusion, I am locking this thread. Please post all replies in the other thread. Thank you.

Posting Permissions

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