DROP TRIGGER LD0T0U34_BVK_DEL
;
CREATE TRIGGER LD0T0U34_BVK_DEL ON LD0P0U34
AFTER DELETE
AS 
BEGIN
SET XACT_ABORT ON
SET NOCOUNT ON
    IF EXISTS (SELECT * FROM LD0P0BVK WHERE OBJEKTID = 7441 AND OBJEKTNR IN (SELECT CONVERT(VARCHAR,PLANAKTIVITETNR) FROM DELETED))
    BEGIN 
    DELETE FROM LD0P0BVK
      WHERE OBJEKTID = 7441 
        AND OBJEKTNR IN (SELECT CONVERT(VARCHAR,PLANAKTIVITETNR) FROM DELETED)
    END
END
;