dbo.TSB_TATTUTSBAccountDef
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
Relations
- Trigger parent table: TSBAccountDef
Typed Edges
- trigger on table TSBAccountDef Trigger parent table: TSBAccountDef
- 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_FGISessionContext
- dbo.QBM_PSessionErrorAdd
- dbo.QER_PITShopHelperFill
- dbo.QER_PITShopHelperFill_Recalc
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger TSB_TATTUTSBAccountDef2 ON TSBAccountDef 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(UID_AccProduct)19 BEGIN20 DECLARE @RecalcParameter_01 QBM_YCursorBuffer21 INSERT INTO @RecalcParameter_01(ObjectKey1,22 UID1,23 Ident1)24 SELECT25 a.XObjectKey,26 'ATT-PWODecisionRule-OrgATT',27 'A'28 FROM AccProduct a29 JOIN inserted i30 ON a.UID_AccProduct = i.UID_AccProduct31 UNION all32 SELECT33 a.XObjectKey,34 'ATT-PWODecisionRule-OrgATT',35 'A'36 FROM AccProduct a37 JOIN deleted d38 ON a.UID_AccProduct = d.UID_AccProduct39 EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,40 @GenprocID41 END42 END TRY43 BEGIN CATCH44 EXEC QBM_PSessionErrorAdd DEFAULT45 RAISERROR('',46 18,47 1)48 WITH NOWAIT49 END CATCH50 ende:51 RETURN52END
Open raw exported source
1 create trigger TSB_TATTUTSBAccountDef on TSBAccountDef 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(UID_AccProduct3) begin declare @RecalcParameter_01 QBM_YCursorBuffer insert into @RecalcParameter_01 (ObjectKey1, UID1, Ident1) select a.XObjectKey , 'ATT-PWODecisionRule-OrgATT'4, 'A' from AccProduct a join inserted i on a.UID_AccProduct = i.UID_AccProduct union all select a.XObjectKey , 'ATT-PWODecisionRule-OrgATT', 'A' from AccProduct5 a join deleted d on a.UID_AccProduct = d.UID_AccProduct exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end END TRY BEGIN CATCH exec6 QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 7