Recent Date Query Compare

grant22

New member
Local time
Today, 01:10
Joined
Jun 15, 2009
Messages
4
I'm trying to run a query which may have duplicate records, but different dates. I want to be able to compare new tables with the master table so it only looks at the most recent date to see if any changes took place. This is what I have so far, but still doesn't return what I would like:

SELECT*

FROM test2

INNER JOIN test1 ON test2.Unique = test1.Unique

WHERE test2.Date <> (Select Max(test1.Date) FROM test1)

AND test2.Ex8<>test1.Ex8
 
Are you able top post sample tables here for us to view / work with....?
 
I'm attaching a screenshot.

So basically, a report is run each day, in which some fields may change day to day. So when a record has a field that changes, I want to be able to add it into the master table. In the screenshot, you can see that there are two different dates for unique value a078243-SAISAT because the Ex8 field changed from D to N. So when I run a new query comparing the table in the screenshot and one from 01/22/2009, I want it to compare it against the most recent date where the Ex8 field changed. I hope that is a good enough explanation. Thanks in advance.
 

Attachments

  • datequery.jpg
    datequery.jpg
    100.2 KB · Views: 98

Users who are viewing this thread

Back
Top Bottom