View Full Version : Update Multiple Fields at Once


eyal8r
09-06-2007, 07:59 PM
Hey guys-
I have 2 identical tables. I want to update the data from Table1 to go into Table2. Each table has well over 70+ fields in them. Instead of handwriting out each [Table].[Field] in either SQL or the Designer- is there a shortcut to tell Access to grab all the fields from Table1 and update all the fields in Table2 (all the fields have the same name)? I just don't have the energy to type it all out- I figure there's got to be a way...

I know when you do an APPEND query in the designer- it will do this for you- but not the UPDATE query...
Thanks!

Uncle Gizmo
09-06-2007, 11:07 PM
If you've got 70 fields in a table it sounds like you are not observing basic design rules!

With regard to your problem, why not just make a copy of the updated table and rename it to the name of the other table?

eyal8r
09-07-2007, 05:24 AM
The Table1 is actually a linked table from another application- I don't want to change that table at all- just copy the info out of it into MY table (Table2). From there, I manipulate the data, then normalize and split it up into about 8 different tables (about a level 4 normalization). Appending won't work- I need an update.

neileg
09-07-2007, 07:52 AM
If you are repeating code you could always write the SQL in Word so you can use copy and paste, and then paste that into the SQL view of a blank query.

Uncle Gizmo
09-07-2007, 08:00 AM
Are new records added to table 1?

eyal8r
09-07-2007, 08:04 AM
Yes, but not in Access. They are added at various times in a different software package.

Uncle Gizmo
09-07-2007, 08:23 AM
You will need to append these new records as well then?

If correct, is there a unique identifier?