Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

subquery

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
geebee - 29 Jun 2006 22:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.