dbo.POL_TIQERPolicy
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 -> POL-K-QERPolicyFill / POL_ZQERPolicyFill at line 9
- Bulk DBQueue insert -> POL-K-QERPolicyMakeProc / POL_ZQERPolicyMakeProc at line 9
- Bulk DBQueue insert -> POL-K-QERPolicyMakeProc / POL_ZQERPolicyMakeProc at line 10
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: QERPolicy
Typed Edges
- queues DBQueue task POL_ZQERPolicyFill at line 9 Bulk DBQueue insert -> POL-K-QERPolicyFill / POL_ZQERPolicyFill at line 9
- queues DBQueue task POL_ZQERPolicyMakeProc at line 9 Bulk DBQueue insert -> POL-K-QERPolicyMakeProc / POL_ZQERPolicyMakeProc at line 9
- queues DBQueue task POL_ZQERPolicyMakeProc at line 10 Bulk DBQueue insert -> POL-K-QERPolicyMakeProc / POL_ZQERPolicyMakeProc at line 10
- trigger on table QERPolicy Trigger parent table: QERPolicy
- 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 POL_TIQERPolicy2 ON QERPolicy FOR3INSERT NOT FOR Replication4AS5BEGIN6 DECLARE @SQLToCheck QBM_YParameterList7 BEGIN TRY8 IF EXISTS(9 SELECT TOP 1 110 FROM inserted)11 GOTO start12 RETURN start:13 DECLARE @GenProcID varchar(38)14 SELECT @GenProcID = dbo.QBM_FGISessionContext('')15 INSERT INTO @SQLToCheck(Parameter1,16 ContentFull)17 SELECT18 c.XObjectKey,19 'select top 1 1 as columnvalue from ' + t.TableName + '20 where (21 ' + c.WhereClause + '22 )'23 FROM inserted c24 JOIN DialogTable t25 ON c.UID_DialogTable = t.UID_DialogTable26 WHERE27 c.WhereClause > ' '28 EXEC QBM_PSQLCheckExecutable @SQLToCheck,29 @RaiseError = 130 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw31 INSERT INTO @DBQueueElements_01(object,32 subobject,33 genprocid)34 SELECT35 x.uid,36 NULL,37 @GenProcID38 FROM(39 SELECT i.uid_QERPolicy AS uid40 FROM inserted i41 WHERE42 isnull(IsInactive, 0) = 0 AND isnull(IsWorkingCopy, 0) = 0) AS x43 EXEC QBM_PDBQueueInsert_Bulk 'POL-K-QERPolicyFill',44 @DBQueueElements_0145 EXEC QBM_PDBQueueInsert_Bulk 'POL-K-QERPolicyMakeProc',46 @DBQueueElements_0147 END TRY48 BEGIN CATCH49 EXEC QBM_PSessionErrorAdd DEFAULT50 RAISERROR('',51 18,52 1)53 WITH NOWAIT54 END CATCH55 ende:56 RETURN57END
Open raw exported source
1 create trigger POL_TIQERPolicy on QERPolicy for Insert not for Replication as begin declare @SQLToCheck QBM_YParameterList BEGIN TRY if exists2 (select top 1 1 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') insert into 3@SQLToCheck(Parameter1, ContentFull) select c.XObjectKey, 'select top 1 1 as columnvalue from ' + t.TableName + '4 where (5 ' + c.WhereClause + '6 )'7 from inserted c join DialogTable t on c.UID_DialogTable = t.UID_DialogTable where c.WhereClause > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError8 = 1 declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select9 i.uid_QERPolicy as uid from inserted i where isnull(IsInactive,0) = 0 and isnull(IsWorkingCopy,0) = 0 ) as x exec QBM_PDBQueueInsert_Bulk 'POL-K-QERPolicyFill'10, @DBQueueElements_01 exec QBM_PDBQueueInsert_Bulk 'POL-K-QERPolicyMakeProc', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default11 RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 12