UpDate Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!!!
 
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.
 
Back
Top