Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Date Function

Status
Not open for further replies.

shauns1

Programmer
Oct 21, 2005
53
AU
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
 
I'm using Access. Which type of SQL does Access use?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top