N
news.microsoft.com
Hi everyone,
I have the following SQL Statement for a mdb query:
SELECT t1.Month, t1.[Unique Users], ((t1.[Unique Users]-t2.[Unique
Users])/t2.[Unique Users]) AS UUChg, t1.[Unique Sessions], ((t1.[Unique
Sessions]-t2.[Unique Sessions])/t2.[Unique Sessions]) AS USChg, t1.[Content
Views], ((t1.[Content Views]-t2.[Content Views])/t2.[Content Views]) AS
CVChg
FROM [CV Unique Usage Data] AS t1 INNER JOIN [CV Unique Usage Data] AS t2 ON
DateSerial(Year(t1.Month),Month(t1.Month-1),Day(t1.Month))=t2.Month
WHERE (((t1.ProivderID)=29) AND ((t2.ProivderID)=29))
ORDER BY t1.Month;
The query worked great in 2006... but I just realized that it won't compare
results from Jan-07 to Dec-06 data. Does anyone know how I could modify
this query so that it will compare each month's data in the mdb table to the
prior month's data? Does Access have a similar command as Excel's EOMONTH
function?
Thanks,
Rob
I have the following SQL Statement for a mdb query:
SELECT t1.Month, t1.[Unique Users], ((t1.[Unique Users]-t2.[Unique
Users])/t2.[Unique Users]) AS UUChg, t1.[Unique Sessions], ((t1.[Unique
Sessions]-t2.[Unique Sessions])/t2.[Unique Sessions]) AS USChg, t1.[Content
Views], ((t1.[Content Views]-t2.[Content Views])/t2.[Content Views]) AS
CVChg
FROM [CV Unique Usage Data] AS t1 INNER JOIN [CV Unique Usage Data] AS t2 ON
DateSerial(Year(t1.Month),Month(t1.Month-1),Day(t1.Month))=t2.Month
WHERE (((t1.ProivderID)=29) AND ((t2.ProivderID)=29))
ORDER BY t1.Month;
The query worked great in 2006... but I just realized that it won't compare
results from Jan-07 to Dec-06 data. Does anyone know how I could modify
this query so that it will compare each month's data in the mdb table to the
prior month's data? Does Access have a similar command as Excel's EOMONTH
function?
Thanks,
Rob