No Update After Specific Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that tracks projects. I would like to create a query that
returns only those projects that have NOT been updated in the last seven
days. The table contains the fields "Date Updated", responsible, & comments.
 
Two step approach.
Create a query that shows all the projects that HAVE been updated in the
last seven days. Save it.

Now, use that query with your projects table in an Unmatched query (use the
query wizard to do this).

One step
Assumption is that you have a Projects table and a ProjectStatus table.

SELECT *
FROM Projects LEFT JOIN
(SELECT ProjectID FROM ProjectStatus WHERE [Date Updated] >
DateAdd("d",-8,Date())) as T
ON Projects.ProjectID = T.ProjectID
WHERE T.ProjectId is Null
 
Great thanks - and by the way good assumption on the two tables.

John Spencer said:
Two step approach.
Create a query that shows all the projects that HAVE been updated in the
last seven days. Save it.

Now, use that query with your projects table in an Unmatched query (use the
query wizard to do this).

One step
Assumption is that you have a Projects table and a ProjectStatus table.

SELECT *
FROM Projects LEFT JOIN
(SELECT ProjectID FROM ProjectStatus WHERE [Date Updated] >
DateAdd("d",-8,Date())) as T
ON Projects.ProjectID = T.ProjectID
WHERE T.ProjectId is Null


Racer57 said:
I have a database that tracks projects. I would like to create a query that
returns only those projects that have NOT been updated in the last seven
days. The table contains the fields "Date Updated", responsible, &
comments.
 

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

Back
Top