Back to OIM Explorer

dbo.ATT_TUQERReuseUS

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on QERReuseUS. Trigger parent table: QERReuseUS

Source: sandbox-db sys.sql_modules

Source size: 887 characters

Interpretation

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

Relations

  • Trigger parent table: QERReuseUS

Typed Edges

  • trigger on table QERReuseUS Trigger parent table: QERReuseUS
  • 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.ATT_TUQERReuse source text reference

Complete Source

SQL52 lines
1CREATE trigger ATT_TUQERReuseUS2  ON QERReuseUS 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
SQL ยท Raw7 lines
1    create   trigger ATT_TUQERReuseUS on QERReuseUS  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