Combining Queries
- From: FrankM <FrankM@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Apr 2005 08:57:07 -0700
I have several Queries that count field entries from last month and the prior
months. They seem to work great but I would like to combine these Queries
into one Query. It must be possible but I am failing at every turn. Anyone
have any ideas?
SQL Query One ...
SELECT Count(*) AS Name1
FROM (SELECT DISTINCT [table].[field]
FROM [table]
WHERE (((Month([Date]))=Month(DateAdd("m",-1,Now()))))
)
SQL Query Two ...
SELECT Count(*) AS Name2
FROM (SELECT DISTINCT [table].[field]
FROM [table]
WHERE (((Month([Date]))=Month(DateAdd("m",-2,Now()))))
)
SQL Query Three ...
SELECT Count(*) AS Name3
FROM (SELECT DISTINCT [table].[field]
FROM [table]
WHERE (((Month([Date]))=Month(DateAdd("m",-3,Now()))))
)
.
- Follow-Ups:
- RE: Combining Queries
- From: Newbie
- Re: Combining Queries
- From: MGFoster
- RE: Combining Queries
- Prev by Date: how do I convert an access query to a table
- Next by Date: Re: MS Access - STRING Datatype (truncating data)
- Previous by thread: how do I convert an access query to a table
- Next by thread: Re: Combining Queries
- Index(es):
Relevant Pages
|