dbo.ATT_TDQERUniversalSubstitute
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
- Bulk DBQueue insert -> ATT-K-AttestationHelper / ATT_ZAttestationHelperFill at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QERUniversalSubstitute
Typed Edges
- queues DBQueue task ATT_ZAttestationHelperFill at line 5 Bulk DBQueue insert -> ATT-K-AttestationHelper / ATT_ZAttestationHelperFill at line 5
- trigger on table QERUniversalSubstitute Trigger parent table: QERUniversalSubstitute
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger ATT_TDQERUniversalSubstitute2 ON QERUniversalSubstitute FOR3DELETE NOT FOR Replication4AS5BEGIN6 DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')7 BEGIN TRY8 IF EXISTS(9 SELECT TOP 1 110 FROM deleted)11 GOTO start12 RETURN start:13 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw14 INSERT INTO @DBQueueElements_01(object,15 subobject,16 genprocid)17 SELECT18 x.uid,19 NULL,20 @GenProcID21 FROM(22 SELECT ac.UID_AttestationCase AS uid23 FROM deleted d24 JOIN AttestationHelper h25 ON d.UID_PersonReceiver = h.UID_PersonHead26 JOIN AttestationCase ac27 ON h.UID_AttestationCase = ac.UID_AttestationCase AND h.LevelNumber = ac.DecisionLevel28 WHERE29 d.IsCurrentlyActive = 1 AND d.UseForAttestation = 1 AND ac.IsClosed = 0) AS x30 EXEC QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper',31 @DBQueueElements_0132 END TRY33 BEGIN CATCH34 EXEC QBM_PSessionErrorAdd DEFAULT35 RAISERROR('',36 18,37 1)38 WITH NOWAIT39 END CATCH40 ende:41 RETURN42END
Open raw exported source
1create trigger ATT_TDQERUniversalSubstitute on QERUniversalSubstitute for delete not for Replication as begin declare @GenProcID varchar(38) 2= dbo.QBM_FGISessionContext('') BEGIN TRY if exists (select top 1 1 from deleted) goto start return start: declare @DBQueueElements_01 QBM_YDBQueueRaw 3insert into @DBQueueElements_01(object, subobject, genprocid) select x.uid, null, @GenProcID from( select ac.UID_AttestationCase as uid from deleted d4 join AttestationHelper h on d.UID_PersonReceiver = h.UID_PersonHead join AttestationCase ac on h.UID_AttestationCase = ac.UID_AttestationCase and h.LevelNumber5 = ac.DecisionLevel where d.IsCurrentlyActive = 1 and d.UseForAttestation = 1 and ac.IsClosed = 0 ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper'6, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7