dateadd expression in a query

B

BigG

I am trying to set a critera in an access 2000 update query that returns all
the records which have not been ordered for two months exactly.

Can anyone help?
 
J

John Vinson

I am trying to set a critera in an access 2000 update query that returns all
the records which have not been ordered for two months exactly.

Can anyone help?

For... the past two months, prior to today? What table do you want to
update? How are your Orders stored?

Making some guesses:

SELECT <whatever> FROM <some table>
WHERE NOT EXISTS (SELECT OrderID FROM Orders WHERE OrderDate >
DateAdd("m", -2, Date()) AND OrderDate <= Date() AND Orders.ProductID
= <some table>.ProductID );


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top