So I have two tables, InTheMiddle
and Table2
.
The 1st one contains Name
column, the 2nd one contains ID
and Name
columns.
(they also have other columns, but irrelevant to this question)
I want to update/change the names in the 1st table with the IDs from the second one, but of course only when the names match and there's only one name (so there aren't any semicolons ";").
Here's a query that I tried to use, but Access tells me "Operation must use an updateable query"
UPDATE InTheMiddle
SET [Name] =
(SELECT [Table2].ID
FROM [Table2]
WHERE InTheMiddle.[Name] = [Table2].[Name]
AND InTheMiddle.[Name] NOT LIKE "*;*"
);