update AKUZ.T_CARD_NOTE
set EmdrBaseObjectEnt = (select EntityId from vclib.T_ENTITIES where EntName = substring(EmdrBaseObjectName, 6) limit 1)
Where EmdrBaseObjectName is not null and EmdrBaseObjectEnt is null;