Match then update query

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

Suppose I have two tables. Both contain Person ID fields
but only one table contains a customer number (comp_ID).
I want to create a query that matches the Per_ID's and
then updates the blank comp_id fields with the
corresponding comp_id from the other table.

Anyone know how to do this in Access or SQL?
 
Matt,

Backup your database. Make a query including both tables, and join them
on the Person ID field. Add the blank Comp_id field to the query design
grid. Make this into an Update Query (select Update from the Query
menu). In the Update To row of the grid, put the equivalent of...
[YourFirstTable].[Comp_id]
Run the query.
 
Back
Top