UPDATE Ware SET Ware.Type = Ware.SortNumber + 20 FROM Ware WITH (NOLOCK)
INNER JOIN WareGroups WITH (NOLOCK) ON WareGroups.WareGroupNumber = Ware.WareGroupNumber
  AND WareGroups.Payment = 4  -- Fee
WHERE Ware.SortNumber <= 7