hi,
Lets say you have a query which says there are 1280 accounts that have a
[DEL GROUP] of "A" for June 28. How do you write a revised query, or
subquery that only counts those accounts that had a different [DEL GROUP] on
6/27. So in essence, those accounts that appear in the table for 6/28 AND
6/27, but have a different [DEL GROUP]?
Thanks in advance,
-geebee
Ken Snell (MVP) - 29 Jun 2006 23:25 GMT
Something like this, perhaps:
SELECT * FROM Tablename
WHERE Tablename.PrimaryKeyField IN
(SELECT T.PrimaryKeyField
FROM Tablename AS T
WHERE T.[Del Group] <> Tablename.[Del Group]
AND T.NameOfDateField = Tablename.NameOfDateField - 1)
AND Tablename.NameOfDateField = [Enter the date:];

Signature
Ken Snell
<MS ACCESS MVP>
> hi,
> Lets say you have a query which says there are 1280 accounts that have a
[quoted text clipped - 6 lines]
> Thanks in advance,
> -geebee
Michel Walsh - 01 Jul 2006 13:19 GMT
Hi,
Maybe something like:
SELECT whatever
FROM somewhere
WHERE [DEL GROUP] <> "A"
AND AccountDate IN( #6/27/2006#, #6/28/2006#)
Hoping it may help,
Vanderghast, Access MVP
> hi,
> Lets say you have a query which says there are 1280 accounts that have a
[quoted text clipped - 6 lines]
> Thanks in advance,
> -geebee