Reputation: 11310
I have 2 tables course and course1 Both the tables have fields called name and id. Table course's id field is currently null. I need to update course table's id field with id of the course1, both tables are related with name field.
I am using access.
Thanks
Prady
Upvotes: 0
Views: 74
Reputation: 8043
update [course 1]
inner join [course]
on course.name = [course 1].name
set [course 1].ID = [course].ID;
Upvotes: 3
Reputation: 1770
update table1 set id = b.id from table1 a inner join table2 b on a.name = b.name
This works on SQL Server. I haven't tried on Access but give it a try.
Upvotes: 1