G
Giorgio
Hi,
I have a table with a date_created and date_expired and I want to
look
at the 15th of each month and every month since the system started
and
count up how many accounts were active at each of those points in
time.
Will have to assume that if there's an expiry date bigger than today
then that account was active at each of those points in time.
I created a numbers table from 1 to 100.
I have the following code working well in SQL2000 but I can't make it
work in Access! Can someone tell me how to make this work in Access
please?
SELECT The15th, COUNT(Account_Created) AS Cnt
FROM AccountsHistorical
RIGHT JOIN (SELECT DATEADD(month,n,'20020703') as The15th FROM
Numbers) x
ON The15th BETWEEN Account_Created AND Accounts_Expire
GROUP BY The15th
ORDER BY The15th
I have a table with a date_created and date_expired and I want to
look
at the 15th of each month and every month since the system started
and
count up how many accounts were active at each of those points in
time.
Will have to assume that if there's an expiry date bigger than today
then that account was active at each of those points in time.
I created a numbers table from 1 to 100.
I have the following code working well in SQL2000 but I can't make it
work in Access! Can someone tell me how to make this work in Access
please?
SELECT The15th, COUNT(Account_Created) AS Cnt
FROM AccountsHistorical
RIGHT JOIN (SELECT DATEADD(month,n,'20020703') as The15th FROM
Numbers) x
ON The15th BETWEEN Account_Created AND Accounts_Expire
GROUP BY The15th
ORDER BY The15th