dbo.QBM_TUAssembly_QBMViewAddOn
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 -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 7
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QBMViewAddOn
Typed Edges
- queues DBQueue task QBM_ZViewBuildAll at line 7 Bulk DBQueue insert -> QBM-K-CommonRebuildView / QBM_ZViewBuildAll at line 7
- trigger on table QBMViewAddOn Trigger parent table: QBMViewAddOn
- references source dbo.QBM_FGIColumnUpdatedOthers source text reference
- 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
- dbo.QBM_FGIColumnUpdatedOthers
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QBM_TUAssembly_QBMViewAddOn2 ON QBMViewAddOn FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')7 BEGIN TRY8 IF EXISTS(9 SELECT TOP 1 110 FROM inserted)11 GOTO start12 IF EXISTS(13 SELECT TOP 1 114 FROM deleted)15 GOTO start16 RETURN start:17 IF dbo.QBM_FGIColumnUpdatedOthers('QBMViewAddOn',18 'IsGenerated',19 columns_updated()) = 120 BEGIN21 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw22 INSERT INTO @DBQueueElements_01(object,23 subobject,24 genprocid)25 SELECT26 x.uid,27 NULL,28 @GenProcID29 FROM(30 SELECT t.UID_DialogTable AS UID31 FROM inserted i32 JOIN DialogTable t33 ON i.UID_DialogTable = t.UID_DialogTable34 WHERE35 i.IsGenerated = 036 UNION37 SELECT t2.UID_DialogTable38 FROM inserted i39 JOIN DialogTable t40 ON i.UID_DialogTable = t.UID_DialogTable41 JOIN DialogTable t242 ON t.UID_DialogTableBase = t2.UID_DialogTable43 WHERE44 i.IsGenerated = 045 UNION46 SELECT t2.UID_DialogTableUnion47 FROM inserted i48 JOIN DialogTable t49 ON i.UID_DialogTable = t.UID_DialogTable50 JOIN DialogTable t251 ON t.UID_DialogTableUnion = t2.UID_DialogTable52 WHERE53 i.IsGenerated = 0) AS x54 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonRebuildView',55 @DBQueueElements_0156 END57 END TRY58 BEGIN CATCH59 EXEC QBM_PSessionErrorAdd DEFAULT60 RAISERROR('',61 18,62 1)63 WITH NOWAIT64 END CATCH65END
Open raw exported source
1 create trigger QBM_TUAssembly_QBMViewAddOn on QBMViewAddOn for Update not for Replication as begin declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext2('') BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: if dbo.QBM_FGIColumnUpdatedOthers3('QBMViewAddOn', 'IsGenerated', columns_updated()) = 1 begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject4, genprocid) select x.uid, null, @GenProcID from (select t.UID_DialogTable as UID from inserted i join DialogTable t on i.UID_DialogTable = t.UID_DialogTable5 where i.IsGenerated = 0 union select t2.UID_DialogTable from inserted i join DialogTable t on i.UID_DialogTable = t.UID_DialogTable join DialogTable t26 on t.UID_DialogTableBase = t2.UID_DialogTable where i.IsGenerated = 0 union select t2.UID_DialogTableUnion from inserted i join DialogTable t on i.UID_DialogTable7 = t.UID_DialogTable join DialogTable t2 on t.UID_DialogTableUnion = t2.UID_DialogTable where i.IsGenerated = 0 ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonRebuildView'8, @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 9