dbo.RMS_TATTUPersonHasESet
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
Relations
- Trigger parent table: PersonHasESet
Typed Edges
- trigger on table PersonHasESet Trigger parent table: PersonHasESet
- references source dbo.QBM_FCVElementToObjectKey1 source text reference
- references source dbo.QBM_FGISessionContext 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_FCVElementToObjectKey1
- dbo.QBM_FGISessionContext
- dbo.QBM_PSessionErrorAdd
- dbo.QER_PITShopHelperFill
- dbo.QER_PITShopHelperFill_Recalc
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger RMS_TATTUPersonHasESet2 ON PersonHasESet 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 IF18 UPDATE(XIsInEffect) OR19 UPDATE(XOrigin)20 BEGIN21 DECLARE @RecalcParameter_01 QBM_YCursorBuffer22 INSERT INTO @RecalcParameter_01(ObjectKey1,23 UID1,24 Ident1)25 SELECT26 dbo.QBM_FCVElementToObjectKey1('Person',27 '',28 i.UID_Person),29 v.UID_PWODecisionRule,30 'A'31 FROM inserted i CROSS32 JOIN(33 VALUES('ATT-PWODecisionRule-XM')) AS v(UID_PWODecisionRule)34 EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,35 @GenprocID36 END37 END TRY38 BEGIN CATCH39 EXEC QBM_PSessionErrorAdd DEFAULT40 RAISERROR('',41 18,42 1)43 WITH NOWAIT44 END CATCH45 ende:46 RETURN47END
Open raw exported source
1 create trigger RMS_TATTUPersonHasESet on PersonHasESet 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 update(XIsInEffect3) or update(XOrigin) begin declare @RecalcParameter_01 QBM_YCursorBuffer insert into @RecalcParameter_01 (ObjectKey1, UID1, Ident1) select dbo.QBM_FCVElementToObjectKey14('Person', '', i.UID_Person), v.UID_PWODecisionRule, 'A' from inserted i cross join (values ('ATT-PWODecisionRule-XM') ) as v (UID_PWODecisionRule) exec5 QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT6 END CATCH ende: return end 7