Back to OIM Explorer

dbo.TSB_TATTUUNSGroupB3

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on UNSGroupB3. Trigger parent table: UNSGroupB3

Source: sandbox-db sys.sql_modules

Source size: 1.214 characters

Interpretation

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

Relations

  • Trigger parent table: UNSGroupB3

Typed Edges

  • trigger on table UNSGroupB3 Trigger parent table: UNSGroupB3
  • 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 source dbo.TSB_TATTUUNSGroupB source text reference

Complete Source

SQL66 lines
1CREATE trigger TSB_TATTUUNSGroupB32  ON UNSGroupB3 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        i.XobjectKey,26        'ATT-PWODecisionRule-AN',27        'A'28      FROM inserted i29      EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_01,30        @GenprocID31      DECLARE @RecalcParameter_02 QBM_YCursorBuffer32      INSERT INTO @RecalcParameter_02(ObjectKey1,33      UID1,34      Ident1)35      SELECT36        b.XObjectKey,37        c.DecisionRule,38        'A'39      FROM(40      SELECT a.XObjectKey41      FROM AccProduct a42      JOIN inserted i43        ON a.UID_AccProduct = i.UID_AccProduct44      UNION45      SELECT a.XObjectKey46      FROM AccProduct a47      JOIN deleted d48        ON a.UID_AccProduct = d.UID_AccProduct) b CROSS49      JOIN(50      SELECT 'ATT-PWODecisionRule-OA' AS DecisionRule51      UNION52      SELECT 'ATT-PWODecisionRule-OrgATT') c53      EXEC QER_PITShopHelperFill_Recalc @RecalcParameter_02,54        @GenprocID55    END56  END TRY57  BEGIN CATCH58    EXEC QBM_PSessionErrorAdd DEFAULT59    RAISERROR('',60    18,61    1)62      WITH NOWAIT63  END CATCH64  ende:65  RETURN66END
Open raw exported source
SQL ยท Raw9 lines
1   create   trigger TSB_TATTUUNSGroupB3 on UNSGroupB3  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 i.XobjectKey , 'ATT-PWODecisionRule-AN'4, 'A' from inserted i exec QER_PITShopHelperFill_Recalc @RecalcParameter_01, @GenprocID  declare @RecalcParameter_02 QBM_YCursorBuffer insert into @RecalcParameter_025 (ObjectKey1, UID1, Ident1) select b.XObjectKey, c.DecisionRule, 'A' from (select a.XObjectKey from AccProduct a join inserted i on a.UID_AccProduct = 6i.UID_AccProduct union select a.XObjectKey from AccProduct a join deleted d on a.UID_AccProduct = d.UID_AccProduct ) b cross join (select 'ATT-PWODecisionRule-OA'7 as DecisionRule union select 'ATT-PWODecisionRule-OrgATT' ) c exec QER_PITShopHelperFill_Recalc @RecalcParameter_02, @GenprocID end  END TRY BEGIN CATCH8 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 9