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!

Difference between tables, how?

Status
Not open for further replies.

Ayac

Programmer
Nov 10, 2000
141
HU
Hi all!

Do you know how to get the difference as a result of two tables? I have two calendar tables in Access (both have the same data structure), one from last week and one from today. I would like to create a query that returns only those lines what are different between the two.
 
Do you mean you have two tables and one has more recent dates than the other, and you want to pick out the more recent ones and ignore the records that cover the same dates? Or do you mean you want to compare last Monday with this Monday, last Tuesday with this Tuesday etc and pick out the days that have different values from the previous week?

 
Hi,

What is the function or purpose of each of these tables?

They must function differently or why would not all the data be in a single table?

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Have you played with the find duplicates wizard that is an option when you build a new query? You could find the duplicates, build a table that just lists the PK field of the ones that are dupes, and then select everything from both of the original tables that's not in the new table. I think.

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
I just want to write a query (or create a new table if necessary) with all those records ONLY what are different in each table.
Basically the situation is the following: I have two identical tables, one is a current list of records and there is another one for last week's records I need to compare.
I create a table for a list of all events happened on the days before on Friday. On the next week's Friday I do the same thing, but I also have to find manually what is the difference from last week's report. I have to find what events had been deleted, added or modified in the new list compared to last week.
Now, I do not want to do this manually, so I thought if I give a unique identifier for each event, then based on the ID, I can compare each record and make a list of those ones what are different in any ways. That is what I want to do in a SQL query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top