Query Question

k209310

Registered User.
Local time
Today, 21:37
Joined
Aug 14, 2002
Messages
184
Ok im using this SQL to count the number of orders that are created that are month old.

SELECT Count([tblEnquiryRegister].[enqRecieved]) AS [One Month Old]
FROM tblEnquiryRegister
WHERE (((tblEnquiryRegister.enqRecieved) Between DateAdd("m",0,Date()) And DateAdd("m",-1,Date())));

I would like the query to also count dates that are two months old and three months old.... but so far i have been unable to add the results to the same query.

Is ther a way to gather this sort of result or would i have to crerate multiple queries for each month?

Thanks alot for any help

Chris
 
Chris,

I'm not strong with date math, but you can create a query
that calculates how many months old each entry is.

Then feed this to a second query and group on your new
months old field and get your counts.

Wayne
 
thanks for the reply

i was really looking fo a way to have mulitple counts in one query one for orders in january then one for orders collected in febuary.
something liks

January Febuary
Count results12 Count results12

I could create one for each month but i could end up with hundreds of similar queries in my Db and i dont really want this.
 

Users who are viewing this thread

Back
Top Bottom