Re: "Where" column limits records regardless of row
From: Jon5001 (Jon5001_at_discussions.microsoft.com)
Date: 03/13/05
- Next message: MGFoster: "Re: Queries for Monthly Summary by Year"
- Previous message: MGFoster: "Re: compare datas between 2 files"
- In reply to: Allen Browne: "Re: "Where" column limits records regardless of row"
- Next in thread: Allen Browne: "Re: "Where" column limits records regardless of row"
- Reply: Allen Browne: "Re: "Where" column limits records regardless of row"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 12 Mar 2005 17:03:01 -0800
Thanks for your help.
I don't believe either of those situations apply. The two tables have an
inner join and none of the four fields used have any null values.
Here is the SQL statement:
SELECT Sum([2004 Cost By Class].[Invoice Amount]) AS [SumOfInvoice Amount],
[2004 Cost By Class].[Store Number], [qry SAME STORES IN IPT DATABASE].OM
FROM [qry SAME STORES IN IPT DATABASE] INNER JOIN [2004 Cost By Class] ON
[qry SAME STORES IN IPT DATABASE].[SITE ID] = [2004 Cost By Class].[Store
Number]
WHERE ((([2004 Cost By Class].[Problem Description]) Like "hand*"))
GROUP BY [2004 Cost By Class].[Store Number], [qry SAME STORES IN IPT
DATABASE].OM
HAVING ((([qry SAME STORES IN IPT DATABASE].OM)=710)) OR ((([qry SAME STORES
IN IPT DATABASE].OM)=711));
"Allen Browne" wrote:
> Do any of these columns involve nulls?
>
> Or are they from different tables with outer joins, so that a Where on the
> related table limits the query to records where there is some value in the
> related table?
>
> If neither of those issues apply, post the SQL statement (SQL View on View
> menu, from query design window).
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Jon5001" <Jon5001@discussions.microsoft.com> wrote in message
> news:0C2578DD-47AA-4F16-AA8B-51D6D524487F@microsoft.com...
> > I've noticed that when I create a totals query and have "Where" in the
> > totals
> > cell, Access will use "AND" to combine the criteria in the "Where" column
> > with the criteria in other columns - even when they are in different rows!
> > Everything I've read seems to say that if criteria are on different rows,
> > the
> > criteria will be combined with an "Or" instead.
> >
> > Could someone please explain what is going on? This is driving me insane!
> >
> > Thanks!
>
>
>
- Next message: MGFoster: "Re: Queries for Monthly Summary by Year"
- Previous message: MGFoster: "Re: compare datas between 2 files"
- In reply to: Allen Browne: "Re: "Where" column limits records regardless of row"
- Next in thread: Allen Browne: "Re: "Where" column limits records regardless of row"
- Reply: Allen Browne: "Re: "Where" column limits records regardless of row"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|