dbo.ARS_TUADSAccount
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
Relations
- Trigger parent table: ADSAccount
Typed Edges
- trigger on table ADSAccount Trigger parent table: ADSAccount
- 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 ARS_TUADSAccount2 ON ADSAccount FOR3UPDATE NOT FOR Replication4AS5BEGIN6 IF EXISTS(7 SELECT TOP 1 18 FROM inserted)9 GOTO start10 IF EXISTS(11 SELECT TOP 1 112 FROM deleted)13 GOTO start14 RETURN start:15 DECLARE @GenProcID varchar(38)16 BEGIN TRY17 SELECT @GenProcID = dbo.QBM_FGISessionContext('')18 IF19 UPDATE(UID_Person)20 BEGIN21 DECLARE @RecalcParameter_01 QBM_YCursorBuffer22 INSERT INTO @RecalcParameter_01(UID1,23 ObjectKey1,24 Ident1)25 SELECT26 'ARS-ITShopRule-KA',27 i.XobjectKey,28 'I'29 FROM inserted i30 INSERT INTO @RecalcParameter_01(UID1,31 ObjectKey1,32 Ident1)33 SELECT34 'ARS-ITShopRule-PA',35 i.XobjectKey,36 'I'37 FROM inserted i38 EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,39 @GenprocID40 END41 END TRY42 BEGIN CATCH43 EXEC QBM_PSessionErrorAdd DEFAULT44 RAISERROR('',45 18,46 1)47 WITH NOWAIT48 END CATCH49 RETURN50END
Open raw exported source
1 create trigger ARS_TUADSAccount on ADSAccount for Update not for Replication as begin if exists (select top 1 1 from inserted) goto start if2 exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) BEGIN TRY select @GenProcID = dbo.QBM_FGISessionContext(''3) if update(UID_Person) begin declare @RecalcParameter_01 QBM_YCursorBuffer insert into @RecalcParameter_01 (UID1, ObjectKey1, Ident1) select 'ARS-ITShopRule-KA'4, i.XobjectKey, 'I' from inserted i insert into @RecalcParameter_01 (UID1, ObjectKey1, Ident1) select 'ARS-ITShopRule-PA', i.XobjectKey, 'I' from inserted5 i exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH6 NOWAIT END CATCH return end 7