dbo.DPR_TDDPRProjectionConfigStep
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
Relations
- Trigger parent table: DPRProjectionConfigStep
Typed Edges
- trigger on table DPRProjectionConfigStep Trigger parent table: DPRProjectionConfigStep
- references source dbo.QBM_PSessionErrorAdd source text reference
Complete Source
1CREATE trigger DPR_TDDPRProjectionConfigStep2 ON DPRProjectionConfigStep FOR3DELETE NOT FOR replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM deleted d10 WHERE11 d.UID_LeftDPRProjectionQuota > ' ')12 BEGIN13 DELETE DPRProjectionStepQuota14 FROM DPRProjectionStepQuota x15 JOIN deleted d16 ON x.UID_DPRProjectionStepQuota = d.UID_LeftDPRProjectionQuota17 END18 IF EXISTS(19 SELECT TOP 1 120 FROM deleted d21 WHERE22 d.UID_RightDPRProjectionQuota > ' ')23 BEGIN24 DELETE DPRProjectionStepQuota25 FROM DPRProjectionStepQuota x26 JOIN deleted d27 ON x.UID_DPRProjectionStepQuota = d.UID_RightDPRProjectionQuota28 END29 IF EXISTS(30 SELECT TOP 1 131 FROM deleted d32 WHERE33 d.UID_DPRSystemObjectMatchSets > ' ')34 BEGIN35 DELETE DPRSystemObjectMatchSets36 FROM DPRSystemObjectMatchSets x37 JOIN deleted d38 ON x.UID_DPRSystemObjectMatchSets = d.UID_DPRSystemObjectMatchSets39 END40 END TRY41 BEGIN CATCH42 EXEC QBM_PSessionErrorAdd DEFAULT43 RAISERROR('',44 18,45 1)46 WITH NOWAIT47 END CATCH48 ende:49 RETURN50END
Open raw exported source
1 create trigger DPR_TDDPRProjectionConfigStep on DPRProjectionConfigStep for delete not for replication as begin BEGIN TRY if exists (select2 top 1 1 from deleted d where d.UID_LeftDPRProjectionQuota > ' ' ) begin delete DPRProjectionStepQuota from DPRProjectionStepQuota x join deleted d on 3x.UID_DPRProjectionStepQuota = d.UID_LeftDPRProjectionQuota end if exists (select top 1 1 from deleted d where d.UID_RightDPRProjectionQuota > ' ' ) begin4 delete DPRProjectionStepQuota from DPRProjectionStepQuota x join deleted d on x.UID_DPRProjectionStepQuota = d.UID_RightDPRProjectionQuota end if exists5 (select top 1 1 from deleted d where d.UID_DPRSystemObjectMatchSets > ' ' ) begin delete DPRSystemObjectMatchSets from DPRSystemObjectMatchSets x join6 deleted d on x.UID_DPRSystemObjectMatchSets = d.UID_DPRSystemObjectMatchSets end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 718, 1) WITH NOWAIT END CATCH ende: return end 8