I have a query that works fine:
SELECT tblPFTopics.DevelopmentID, Count(*) as TotalDev
FROM tblPFEntries, tblPFTopics, tblPFThreads
WHERE tblPFTopics.TopicID =tblPFThreads.TopicID AND tblPFThreads.ThreadID=tblPFEntries.ThreadID
Group By tblPFTopics.DevelopmentID
Until I add:
AND DateDiff('d',tblPFEntries.CreationDate,Now())<30
to the WHERE clause. At which point I get the following error:
The LEVEL clause includes a reserved word or argument that is mispelled or missing or the punctuation is incorrect
I have Googled the error message but all posts relate to variables called LEVEL. I have no such variable, nor field by this name.
Any ideas why I'm getting this error?
Shaun
SELECT tblPFTopics.DevelopmentID, Count(*) as TotalDev
FROM tblPFEntries, tblPFTopics, tblPFThreads
WHERE tblPFTopics.TopicID =tblPFThreads.TopicID AND tblPFThreads.ThreadID=tblPFEntries.ThreadID
Group By tblPFTopics.DevelopmentID
Until I add:
AND DateDiff('d',tblPFEntries.CreationDate,Now())<30
to the WHERE clause. At which point I get the following error:
The LEVEL clause includes a reserved word or argument that is mispelled or missing or the punctuation is incorrect
I have Googled the error message but all posts relate to variables called LEVEL. I have no such variable, nor field by this name.
Any ideas why I'm getting this error?
Shaun