dbo.ATT_TUBaseTree
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
- References QBM_PDBQueueInsert_Single
- Trigger parent table: BaseTree
Typed Edges
- queues DBQueue task QBM_ZRecalculate at line 7 Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 7
- trigger on table BaseTree Trigger parent table: BaseTree
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger ATT_TUBaseTree2 ON BaseTree FOR3UPDATE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 IF EXISTS(12 SELECT TOP 1 113 FROM deleted)14 GOTO start15 RETURN start:16 DECLARE @GenProcID varchar(38)17 SELECT @GenProcID = dbo.QBM_FGISessionContext('')18 IF19 UPDATE(uid_orgdepartment) OR20 UPDATE(uid_orgProfitCenter) OR21 UPDATE(UID_orgtype) OR22 UPDATE(uid_rulercontainer) OR23 UPDATE(uid_rulercontainerIT) OR24 UPDATE(uid_parentorg) OR25 UPDATE(UID_OrgAttestator)26 BEGIN27 IF EXISTS(28 SELECT TOP 1 129 FROM BaseTree b30 JOIN deleted d31 ON b.uid_org = d.uid_org32 WHERE33 (isnull(b.UID_RulerContainer, '') <> isnull(d.UID_RulerContainer, '') OR isnull(b.UID_RulerContainerIT,34 '') <> isnull(d.UID_RulerContainerIT, '') OR isnull(b.uid_orgdepartment, '') <> isnull(d.uid_orgdepartment,35 '') OR isnull(b.uid_orgProfitCenter, '') <> isnull(d.uid_orgProfitCenter, '') OR isnull(b.uid_parentorg,36 '') <> isnull(d.uid_parentorg, '') OR isnull(b.UID_OrgAttestator, '') <> isnull(d.UID_OrgAttestator, '')))37 BEGIN38 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',39 'ATT-K-AttestationHelper-Cfg',40 '',41 @GenProcID42 END43 END44 END TRY45 BEGIN CATCH46 EXEC QBM_PSessionErrorAdd DEFAULT47 RAISERROR('',48 18,49 1)50 WITH NOWAIT51 END CATCH52 RETURN53END
Open raw exported source
1create trigger ATT_TUBaseTree on BaseTree for UPDATE not for Replication as begin BEGIN TRY if exists (select top 1 1 from inserted) goto start2 if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if 3 update(uid_orgdepartment) or update(uid_orgProfitCenter) or update(UID_orgtype) or update(uid_rulercontainer) or update(uid_rulercontainerIT) or update4(uid_parentorg) or update(UID_OrgAttestator) begin if exists (select top 1 1 from BaseTree b join deleted d on b.uid_org = d.uid_org where ( isnull(b.UID_RulerContainer5,'') <> isnull(d.UID_RulerContainer,'') or isnull(b.UID_RulerContainerIT,'') <> isnull(d.UID_RulerContainerIT,'') or isnull(b.uid_orgdepartment,'') <> 6isnull(d.uid_orgdepartment,'') or isnull(b.uid_orgProfitCenter,'') <> isnull(d.uid_orgProfitCenter,'') or isnull(b.uid_parentorg,'') <> isnull(d.uid_parentorg7,'') or isnull(b.UID_OrgAttestator,'') <> isnull(d.UID_OrgAttestator,'') ) ) begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate', 'ATT-K-AttestationHelper-Cfg'8, '', @GenProcID end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH return end 9