
update AKUZ.T_EVENT_BASE eb 
set AmbulanceCard = acr.AmbulanceCard
from AKUZ.T_AMBULANCE_CARD_RECORD acr 
where acr.AmbulanceEvent = eb.EventID and eb.AmbulanceCard is null;

delete from AKUZ.T_EVENT_BASE where AmbulanceCard is null;

ALTER TABLE AKUZ.T_EVENT_BASE ALTER COLUMN "ambulancecard" SET NOT NULL;