Match then update query

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?
 
S

Steve Schapel

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.
 

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