update StorageLocation set orgUnitName = (select name from OrgUnit where orgUnitCoding = StorageLocation.orgUnitCode) where orgUnitName <> (select name from OrgUnit where orgUnitCoding = StorageLocation.orgUnitCode); update StorageLocation set wareHouseName = (select name from WareHouse where id = StorageLocation.wareHouseId) where wareHouseName <> (select name from WareHouse where id = StorageLocation.wareHouseId);