Hi, Use below query
UPDATE dbo.Approved
SET dbo.Approved.Groupid=dbo.Locations.ID
FROM dbo.Approved, dbo.Locations
WHERE dbo.Approved.Location = dbo.Locations.Location_Name
UPDATE dbo.Approved
SET dbo.Approved.Groupid=dbo.Locations.ID
FROM dbo.Approved inner join dbo.Locations On
dbo.Approved.Location = dbo.Locations.Location_Name