dbo.QER_TDAccProductGroup
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 -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: AccProductGroup
Typed Edges
- queues DBQueue task QER_ZAccProductGroupCollection at line 5 Bulk DBQueue insert -> QER-K-AccProductGroupCollection / QER_ZAccProductGroupCollection at line 5
- trigger on table AccProductGroup Trigger parent table: AccProductGroup
- 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 QER_TDAccProductGroup2 ON AccProductGroup FOR3DELETE NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM deleted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw15 INSERT INTO @DBQueueElements_01(object,16 subobject,17 genprocid)18 SELECT19 x.uid,20 NULL,21 @GenProcID22 FROM(23 SELECT d.UID_AccProductGroup AS uid24 FROM deleted d25 UNION26 SELECT d.UID_AccProductGroupParent AS uid27 FROM deleted d28 WHERE29 d.UID_AccProductGroupParent > ' '30 UNION31 SELECT co.UID_AccProductGroupChild32 FROM deleted d33 JOIN AccProductGroupCollection co34 ON d.UID_AccProductGroupParent = co.UID_AccProductGroupParent) AS x35 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-AccProductGroupCollection',36 @DBQueueElements_0137 END TRY38 BEGIN CATCH39 EXEC QBM_PSessionErrorAdd DEFAULT40 RAISERROR('',41 18,42 1)43 WITH NOWAIT44 END CATCH45 RETURN46END
Open raw exported source
1create trigger QER_TDAccProductGroup on AccProductGroup for delete not for Replication as begin BEGIN TRY if exists (select top 1 1 from deleted2) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @DBQueueElements_01 QBM_YDBQueueRaw3 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select d.UID_AccProductGroup as uid from deleted 4d union select d.UID_AccProductGroupParent as uid from deleted d where d.UID_AccProductGroupParent > ' ' union select co.UID_AccProductGroupChild from 5deleted d join AccProductGroupCollection co on d.UID_AccProductGroupParent = co.UID_AccProductGroupParent ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-AccProductGroupCollection'6, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH return end 7