Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Unanswered: Sum columns in sql statement give inconsistent returns

    Amt
    >0 (query1)


    Myalias:sum([amt]) Amt
    >0 (query2)

    why does this give me different totals??!!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    some of the amts are negative


    rudy

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    Originally posted by r937
    some of the amts are negative


    rudy
    but the criteria is >0 in both queries only one is placed directly under the filed and the other is placed within the alias of that field so in essence aren't both eliminating the zeros and less than zero

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    where is the test for sum>0 done in the second query?

    can you show the sql for each query?

  5. #5
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    Originally posted by r937
    where is the test for sum>0 done in the second query?

    can you show the sql for each query?

    Negatives - all a matter on how it is parsed - thanks man

Posting Permissions

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