Re: query miscalculation
From: Alex (Alex_at_discussions.microsoft.com)
Date: 12/30/04
- Next message: Dale Fye: "Re: Help on a complicated query!?"
- Previous message: Access rookie: "Disappearing results in query..."
- In reply to: John Vinson: "Re: query miscalculation"
- Next in thread: John Spencer (MVP): "Re: query miscalculation"
- Reply: John Spencer (MVP): "Re: query miscalculation"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Dec 2004 17:25:02 -0800
Thanks, John.
I did it but the same result: the sum of [PayrollWorkedTime] is 6,645.25
instead of 6,657.
I'll try to find which row gives this mistake.
"John Vinson" wrote:
> On Wed, 29 Dec 2004 16:31:03 -0800, "Alex"
> <Alex@discussions.microsoft.com> wrote:
>
> >AND ((tblAdjustedData.AdditionCode)<>"L" And
> >(tblAdjustedData.AdditionCode)<>"P" And (tblAdjustedData.AdditionCode)<>"W"));
>
> >I've checked the result of the query without WHERE in Excel, calculating "L"
> >and "P" separately there. Everything is correct. It should be 6,810.5 for
> >all, 65.5 for "L", and 88 for "P". But, with the criteria <>"L" And <> "P"
> >it's not working in Access.
>
> Well, if the code is P then it's certainly not equal to L; and if it's
> L, it's certainly not W. Therefore the clause above will return all
> records with non-NULL addition codes.
>
> Change that portion of the Where clause to
>
> AND tblAdjustedData.AdditionCode NOT IN("L", "P", "W")
>
>
> John W. Vinson[MVP]
>
- Next message: Dale Fye: "Re: Help on a complicated query!?"
- Previous message: Access rookie: "Disappearing results in query..."
- In reply to: John Vinson: "Re: query miscalculation"
- Next in thread: John Spencer (MVP): "Re: query miscalculation"
- Reply: John Spencer (MVP): "Re: query miscalculation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|