Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    62

    Unanswered: Using SUM in a query - It just won't work!!!

    Hi,
    I apologise if this has been asked before but I can't seem to find what I need in past posts!

    I have a field called FinalScore and the entries are either +.-,? or empty. I'm trying to use a query to add up the +,-,? entries whilst not including the empty entry. For example:
    Final Score
    +
    +
    +
    -
    -
    ?
    empty
    empty
    +
    Sum should equal 7.

    I've tried converting the scores to numbers and then adding up the numbers but I wondered if there was a more direct way of doing this?
    thank you for your help in advance,
    Sue

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Select count(*) from (select 1 from a where field IN ('+', '-'))
    Last edited by r123456; 07-15-04 at 09:03.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Apr 2004
    Posts
    62

    thanks but

    Hi thanks for helping but I don't know what to do with your reply? Where do I put it and how do I link it to the necessary tables and fields?

    Sorry I'm still learning!!!
    thanks
    Sue

  4. #4
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Thank You.
    Attached Files Attached Files
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  5. #5
    Join Date
    Apr 2004
    Posts
    62

    uh ha!

    I see! thank you very much - that's saved a lot of time and tears!
    cheers
    Sue

Posting Permissions

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