Back to OIM Explorer

dbo.TSB_TATTUUNSRootB

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on UNSRootB. Trigger parent table: UNSRootB

Source: sandbox-db sys.sql_modules

Source size: 1.104 characters

Interpretation

  • Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.

Relations

  • Trigger parent table: UNSRootB

Typed Edges

  • trigger on table UNSRootB Trigger parent table: UNSRootB
  • 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

Complete Source

SQL64 lines
1CREATE trigger TSB_TATTUUNSRootB2  ON UNSRootB 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_AERoleOwner)21    BEGIN22      DECLARE @RecalcParameter_01 QBM_YCursorBuffer23      INSERT INTO @RecalcParameter_01(ObjectKey1,24      UID1,25      Ident1)26      SELECT27        i.XobjectKey,28        'TSB-PWODecisionRule-EN',29        'A'30      FROM inserted i31      INSERT INTO @RecalcParameter_01(ObjectKey1,32      UID1,33      Ident1)34      SELECT35        bt.XobjectKey,36        'TSB-PWODecisionRule-SO',37        'A'38      FROM inserted i39      JOIN basetree bt40        ON i.uid_AERoleOwner = bt.UID_Org41      INSERT INTO @RecalcParameter_01(ObjectKey1,42      UID1,43      Ident1)44      SELECT45        bt.XobjectKey,46        'TSB-PWODecisionRule-SO',47        'A'48      FROM deleted d49      JOIN basetree bt50        ON d.uid_AERoleOwner = bt.UID_Org51      EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,52        @GenprocID53    END54  END TRY55  BEGIN CATCH56    EXEC QBM_PSessionErrorAdd DEFAULT57    RAISERROR('',58    18,59    1)60      WITH NOWAIT61  END CATCH62  ende:63  RETURN64END
Open raw exported source
SQL ยท Raw9 lines
1    create   trigger TSB_TATTUUNSRootB on UNSRootB  for Update not for Replication as begin  declare @Parameter nvarchar(1000) BEGIN TRY if exists2 (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID3 = dbo.QBM_FGISessionContext('') if update(uid_AERoleOwner) begin     declare @RecalcParameter_01 QBM_YCursorBuffer insert into @RecalcParameter_01 (ObjectKey14, UID1, Ident1) select i.XobjectKey , 'TSB-PWODecisionRule-EN', 'A' from inserted i  insert into @RecalcParameter_01 (ObjectKey1, UID1, Ident1) select 5bt.XobjectKey, 'TSB-PWODecisionRule-SO', 'A' from inserted i join basetree bt on i.uid_AERoleOwner = bt.UID_Org insert into @RecalcParameter_01 (ObjectKey16, UID1, Ident1) select bt.XobjectKey, 'TSB-PWODecisionRule-SO', 'A' from deleted d join basetree bt on d.uid_AERoleOwner = bt.UID_Org exec QER_PITShopHelperFill_Recalc7 @RecalcParameter_01, @GenprocID  end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end8 9