Wasteland
Wasteland

Reputation: 5399

MS-Access 2016 - update a record based on a record from another table

I'm new to MS access. I have a few tables. Table 'Learners' contains columns such as 'LearnerID' (unique), firstname, surname, status, etc. There's another table (LearnerUpdate) that I created by importing a spreadsheet. The LearnerUpdate also contains a learnerID and their names. I need to match the learner ID and update teh LearnerUpdate table to include the 'status' taken from the 'Learners' table. How do I do it? I'm not even sure what to google for. The Access terminology is alien to me.

Thank you

Upvotes: 1

Views: 220

Answers (1)

mdialogo
mdialogo

Reputation: 473

Assuming the column you want to update in the LearnerUpdate table is named 'Status', then try to execute this SQL in the Queries table:

UPDATE LearnerUpdate 
INNER JOIN Learners 
ON LearnerUpdate.LearnerID = Learners.LearnerID 
SET LearnerUpdate.Status = Learners.Status

Upvotes: 1

Related Questions