DO $$
DECLARE 
    EventEntityId INT;
BEGIN
    SELECT EntityID INTO EventEntityId FROM VCLib.T_ENTITIES WHERE EntName = 'INTOXICATION_EVENT';
    
    UPDATE AKUZ.T_EVENT_BASE SET EventPerpose = 10811 WHERE type_ = EventEntityId;
END $$;