Merge two tables

aanders

Registered User.
Local time
Today, 14:20
Joined
Sep 5, 2013
Messages
30
Hi!
I have a database with the following tables:
- data
- datamodifications
- mergeddata

The "data" table is imported from a large excel file (about 5000 rows and 40 columns) and needs to be updated about once a year.

The idea is to use the "datamodifications" table to store all modifications and then merge "datamodifications" and "data" into "mergeddata", so when i have to update the "data" table next year i can just remerge it with my modifications.

My problem is that i can´t merge the two without getting dupliace entries. I have tried with this query but it gives me duplicate entries:
Code:
SELECT col1, col2, col3 
FROM data
UNION
SELECT col1, col2, col3 
FROM datamodifications
ORDER BY col1;
How can i remove the duplicate entries (or is there a better way than actually writing SQL to do what i want do to?

(Sorry for the poor english, it is not my mother tounge).
 
Have you tried using an append query with linked tables to combine all data into one new table?

Then run query wizard to find duplicates within that new table?
 
Sorry, I am quite the newbie on Access. I got the duplicate entries from the merged table. How do i delete the obsolete one?
 
Okay, if you go to 'Create' and you'll find at the end 'Query Wizard'. Click that and then you'll see "Find Duplicates Query Wizard". Click that and run it'll return any duplicates, which you can delete. Make sure you back up table before just in case, but I'm fairly sure that will work.
 

Users who are viewing this thread

Back
Top Bottom