No Update After Specific Date

R

Racer57

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.
 
J

John Spencer

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
 
R

Racer57

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.
 
Top