DROP TRIGGER LD0T0U35_BVK_DEL
;
CREATE TRIGGER LD0T0U35_BVK_DEL ON LD0P0U35
AFTER DELETE
AS 
BEGIN
SET XACT_ABORT ON
SET NOCOUNT ON
    IF EXISTS (SELECT * FROM LD0P0BVK WHERE OBJEKTID = 7449 AND OBJEKTNR IN (SELECT CONVERT(VARCHAR,AKTIVITETNR) FROM DELETED))
    BEGIN 
    DELETE FROM LD0P0BVK
      WHERE OBJEKTID = 7449 
        AND OBJEKTNR IN (SELECT CONVERT(VARCHAR,AKTIVITETNR) FROM DELETED)
    END
END
;