dbo.QER_TIAccProductGroup
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_TIAccProductGroup2 ON AccProductGroup FOR3INSERT NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 DECLARE @XUser nvarchar(64)14 SELECT @GenProcID = dbo.QBM_FGISessionContext('')15 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw16 INSERT INTO @DBQueueElements_01(object,17 subobject,18 genprocid)19 SELECT20 x.uid,21 NULL,22 @GenProcID23 FROM(24 SELECT i.UID_AccProductGroup AS uid25 FROM inserted i26 UNION27 SELECT i.UID_AccProductGroupParent AS uid28 FROM inserted i29 WHERE30 i.UID_AccProductGroupParent > ' '31 UNION32 SELECT co.UID_AccProductGroupChild33 FROM inserted i34 JOIN AccProductGroupCollection co35 ON i.UID_AccProductGroupParent = co.UID_AccProductGroupParent) AS x36 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-AccProductGroupCollection',37 @DBQueueElements_0138 END TRY39 BEGIN CATCH40 EXEC QBM_PSessionErrorAdd DEFAULT41 RAISERROR('',42 18,43 1)44 WITH NOWAIT45 END CATCH46 RETURN47END
Open raw exported source
1 create trigger QER_TIAccProductGroup on AccProductGroup for Insert not for Replication as begin BEGIN TRY if exists (select top 1 1 from2 inserted) goto start return start: declare @GenProcID varchar(38) declare @XUser nvarchar(64) select @GenProcID = dbo.QBM_FGISessionContext('') declare3 @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select i.UID_AccProductGroup4 as uid from inserted i union select i.UID_AccProductGroupParent as uid from inserted i where i.UID_AccProductGroupParent > ' ' union select co.UID_AccProductGroupChild5 from inserted i join AccProductGroupCollection co on i.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