Do I use an update query here?

ogg13

Registered User.
Local time
Today, 13:14
Joined
Jan 30, 2007
Messages
49
I have one table, which will contain 4-10 or so records tops. Its structure is identical to another table with many many more records in it.

I want to take the table with the small amount of records and basically overwrite data in the other table that matches a field in the small table, without mucking up the rest of the non-related data in the large table.

Im self taught and I really havent used update queries much. Is this what I am looking for or am I uncovering a can of worms that I dont want to mess with? :P

Thanks!
 
I think you wantto use an Append Query to move the records from 1 table to the other. Try looking in Access Help for info about the different query types
 
Well, unfortunately, an append query would result in a key violation. I need to find a way to either delete before I append or simply overwrite data in the main table. If anyone has any pointers, please send them my way, im 100% stumped.
 
Sorry I didnt read your post properly (slaps wrist). An update query would be the best way to do this just changing the relevant fields.
 
Perhaps I can clarify with the attached image.

This is all sample data for explanation purposes.

I have two tables, the top being my 'main' table. It will have listings with names, and information related to those names. The combination of first, middle and last name is the primary key for the table.

The bottom table changes frequently. I need to find a mechanism to have the two tables 'merge' essentially. I need to keep the information in the top table that is complete (for instance the last three records in the table) untouched, while being able to move the complete information from the bottom table into the top table. The bottom table will always have complete information.

I cannot append as the primary keys would be duplicated. If I could find a way to delete that specific information in the main table by using the small table as a reference that would work too. Then I could simply use an append query to update the main table.

So far, nothing within my extremely limited realm of knowledge has been able to help me accomplish the above task. If anyone can assist, please do 8)
 

Attachments

  • example.JPG
    example.JPG
    58 KB · Views: 155
You can always write a Delete Query to clean up the Main table before running an Append query.
 

Users who are viewing this thread

Back
Top Bottom