dbo.RMB_TUPerson
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 -> RMB-K-HelperPersonOrg / RMB_ZHelperPersonOrg at line 5
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: Person
Typed Edges
- queues DBQueue task RMB_ZHelperPersonOrg at line 5 Bulk DBQueue insert -> RMB-K-HelperPersonOrg / RMB_ZHelperPersonOrg at line 5
- trigger on table Person Trigger parent table: Person
- 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.QER_PITShopHelperFill source text reference
- references source dbo.QER_PITShopHelperFill_Recalc source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PSessionErrorAdd
- dbo.QER_PITShopHelperFill
- dbo.QER_PITShopHelperFill_Recalc
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger RMB_TUPerson2 ON Person FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @Parameter nvarchar(1000)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 DECLARE @GenProcID varchar(38)18 SELECT @GenProcID = dbo.QBM_FGISessionContext('')19 IF20 UPDATE(uid_org)21 BEGIN22 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw23 INSERT INTO @DBQueueElements_01(object,24 subobject,25 genprocid)26 SELECT27 x.uid,28 NULL,29 @GenProcID30 FROM(31 SELECT p.uid_person AS uid32 FROM person p33 JOIN deleted d34 ON p.uid_person = d.uid_person35 WHERE36 isnull(p.uid_org, '') <> isnull(d.uid_org, '')) AS x37 EXEC QBM_PDBQueueInsert_Bulk 'RMB-K-HelperPersonOrg',38 @DBQueueElements_0139 END40 pwotest:41 IF42 UPDATE(uid_Org)43 BEGIN44 DECLARE @RecalcParameter_01 QBM_YCursorBuffer45 INSERT INTO @RecalcParameter_01(UID1,46 ObjectKey1,47 Ident1)48 SELECT49 'RMB-PWODecisionRule-IO',50 i.XobjectKey,51 'I'52 FROM inserted i53 UNION all54 SELECT55 'RMB-PWODecisionRule-RO',56 i.XobjectKey,57 'I'58 FROM inserted i59 EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,60 @GenprocID61 END62 END TRY63 BEGIN CATCH64 EXEC QBM_PSessionErrorAdd DEFAULT65 RAISERROR('',66 18,67 1)68 WITH NOWAIT69 END CATCH70 ende:71 RETURN72END
Open raw exported source
1 create trigger RMB_TUPerson on Person for Update not for Replication as begin declare @Parameter nvarchar(1000) BEGIN TRY if exists (select2 top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = 3dbo.QBM_FGISessionContext('') if update(uid_org) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, 4genprocid) select x.uid, null, @GenProcID from ( select p.uid_person as uid from person p join deleted d on p.uid_person = d.uid_person where isnull(p.uid_org5, '') <> isnull(d.uid_org, '') ) as x exec QBM_PDBQueueInsert_Bulk 'RMB-K-HelperPersonOrg', @DBQueueElements_01 end pwotest: if update(uid_Org) begin6 declare @RecalcParameter_01 QBM_YCursorBuffer insert into @RecalcParameter_01 (UID1, ObjectKey1, Ident1) select 'RMB-PWODecisionRule-IO', i.XobjectKey7, 'I' from inserted i union all select 'RMB-PWODecisionRule-RO', i.XobjectKey, 'I' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_018, @GenprocID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 9