UpDate Query

A

Adam

How do I create an Update query gets data from table 'A' that has 18 updated fields and overwrite the 18 fields in table 'B'. Table 'B' has many for fields that the 18, so I don't want to change any of the information in the other fields
Please help
Thank you!!!
 
J

John Spencer (MVP)

UPDATE TableA as A INNER JOIN TableB As B
ON A.SomeIDField = B.SomeMatchingIDField
SET B.Field1 = A.Field1,
B.Field2 = A.Field2,
B.Field3 = A.Field3,
B.Field4 = A.Field4,
...
B.Field18 = A.Field18

That assumes that there is some way to match the records in the two tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top