dbo.QER_TUQERRiskIndex
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-QERRiskIndexMakeProc / QER_ZRiskIndexMakeProc at line 6
- Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 6
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QERRiskIndex
Typed Edges
- queues DBQueue task QER_ZRiskIndexMakeProc at line 6 Bulk DBQueue insert -> QER-K-QERRiskIndexMakeProc / QER_ZRiskIndexMakeProc at line 6
- queues DBQueue task QER_ZRiskIndexCalculate at line 6 Bulk DBQueue insert -> QER-K-QERRiskIndexCalculate / QER_ZRiskIndexCalculate at line 6
- trigger on table QERRiskIndex Trigger parent table: QERRiskIndex
- 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 source dbo.QBM_PSQLCheckExecutable source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QBM_PSQLCheckExecutable
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QER_TUQERRiskIndex2 ON QERRiskIndex FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @SQLToCheck QBM_YParameterList7 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 DECLARE @GenProcID varchar(38)18 SELECT @GenProcID = dbo.QBM_FGISessionContext('')19 IF20 UPDATE(QueryString)21 BEGIN22 INSERT INTO @SQLToCheck(Parameter1,23 ContentFull)24 SELECT25 c.XObjectKey,26 c.QueryString27 FROM inserted c28 WHERE29 c.QueryString > ' '30 EXEC QBM_PSQLCheckExecutable @SQLToCheck,31 @RaiseError = 132 END33 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw34 INSERT INTO @DBQueueElements_01(object,35 subobject,36 genprocid)37 SELECT38 x.uid,39 NULL,40 @GenProcID41 FROM(42 SELECT43 DISTINCT d.uid_dialogColumn AS uid44 FROM deleted d45 WHERE46 d.uid_dialogColumn > ' ') AS x47 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexMakeProc',48 @DBQueueElements_0149 EXEC QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexCalculate',50 @DBQueueElements_0151 END TRY52 BEGIN CATCH53 EXEC QBM_PSessionErrorAdd DEFAULT54 RAISERROR('',55 18,56 1)57 WITH NOWAIT58 END CATCH59 ende:60 RETURN61END
Open raw exported source
1create trigger QER_TUQERRiskIndex on QERRiskIndex for Update not for Replication as begin declare @SQLToCheck QBM_YParameterList BEGIN TRY if2 exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select3 @GenProcID = dbo.QBM_FGISessionContext('') if update(QueryString) begin insert into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey, c.QueryString4 from inserted c where c.QueryString > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 end declare @DBQueueElements_01 QBM_YDBQueueRaw insert5 into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct d.uid_dialogColumn as uid from deleted d6 where d.uid_dialogColumn > ' ' ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexMakeProc', @DBQueueElements_01 exec QBM_PDBQueueInsert_Bulk 'QER-K-QERRiskIndexCalculate'7, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 8