thx rabbite, but i got a new problem again =\
Please have a look at the query below:
SELECT *
FROM(
SELECT username, DateValue(logtime) AS Date_Clocked
FROM NGAC_SYSTEMLOG
WHERE (logtime BETWEEN #9/1/2005# AND #9/30/2005#)
GROUP BY username, DateValue(logtime))
WHERE (Date_Clocked < #9/22/2005# OR Date_Clocked > #9/23/2005#)
;
In this query, I try to select a query from the subquery and I try to select the Date_Clocked column which I rename that column in the subquery, but it complains an error saying smth like they cannot find Date_Clocked and also mentioned that the table must be alrdy exist. Date_Clocked is there but why can't they notice it?? so I tried this way:
SELECT username, DateValue(logtime) AS Date_Clocked,
FROM
[SELECT username, logtime FROM NGAC_SYSTEMLOG WHERE logtime BETWEEN #9/1/2005# AND #9/30/2005#]
WHERE (logtime<#9/23/2005# Or logtime>#9/25/2005#)
GROUP BY username, DateValue(logtime);
First I subquery all records in September 2005, and den I query from it to leave out all records between 9/23/2005 and 9/25/2005, but it still complain the same error! FYI, logtime is an existing feild in an existing table, why does it still complain about it??? =[ I hope someone help me out i would greatly appreciate it