Back to OIM Explorer

dbo.QBM_TUDialogColumnGroupRight

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on DialogColumnGroupRight. Bulk DBQueue insert -> QBM-K-MissingDisplayRightFill / QBM_ZMissingDisplayRightFill at line 9; References QBM_PDBQueueInsert_Bulk; Trigger parent table: DialogColumnGroupRight

Source: sandbox-db sys.sql_modules

Source size: 1.555 characters

Interpretation

  • Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
  • DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.

Relations

  • Bulk DBQueue insert -> QBM-K-MissingDisplayRightFill / QBM_ZMissingDisplayRightFill at line 9
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: DialogColumnGroupRight

Typed Edges

  • queues DBQueue task QBM_ZMissingDisplayRightFill at line 9 Bulk DBQueue insert -> QBM-K-MissingDisplayRightFill / QBM_ZMissingDisplayRightFill at line 9
  • trigger on table DialogColumnGroupRight Trigger parent table: DialogColumnGroupRight
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference
  • references source dbo.QBM_TUDialogColumn source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL70 lines
1CREATE trigger QBM_TUDialogColumnGroupRight2  ON DialogColumnGroupRight FOR3UPDATE NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM inserted)10    GOTO start11    IF EXISTS(12      SELECT TOP 1 113      FROM deleted)14    GOTO start15    RETURN start:16    DECLARE @GenProcID varchar(38) = dbo.QBM_FGISessionContext('')17    IF18    UPDATE(CanSee)19    BEGIN20      DECLARE @DBQueueElements_36836 QBM_YDBQueueRaw21      INSERT INTO @DBQueueElements_36836(Object,22      SubObject,23      GenProcID)24      SELECT25        x.uid,26        NULL,27        @GenProcID28      FROM(29      SELECT ra.UID_DialogTableParent AS uid30      FROM deleted d31      JOIN DialogColumnGroupRight t32        ON d.UID_DialogColumn = t.UID_DialogColumn33      JOIN DialogColumn c34        ON t.UID_DialogColumn = c.UID_DialogColumn35      JOIN QBM_VQBMRelationALL ra36        ON c.UID_DialogTable = ra.UID_DialogTableChild37      WHERE38        isnull(d.CanSee, 0) <> isnull(t.CanSee, 0)39      UNION40      SELECT ra.UID_DialogTableChild41      FROM deleted d42      JOIN DialogColumnGroupRight t43        ON d.UID_DialogColumn = t.UID_DialogColumn44      JOIN DialogColumn c45        ON t.UID_DialogColumn = c.UID_DialogColumn46      JOIN QBM_VQBMRelationALL ra47        ON c.UID_DialogTable = ra.UID_DialogTableParent48      WHERE49        isnull(d.CanSee, 0) <> isnull(t.CanSee, 0)50      UNION51      SELECT c.UID_DialogTable52      FROM deleted d53      JOIN DialogColumnGroupRight t54        ON d.UID_DialogColumn = t.UID_DialogColumn55      JOIN DialogColumn c56        ON t.UID_DialogColumn = c.UID_DialogColumn57      WHERE58        isnull(d.CanSee, 0) <> isnull(t.CanSee, 0)) AS x59      EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-MissingDisplayRightFill',60        @DBQueueElements_3683661    END62  END TRY63  BEGIN CATCH64    EXEC QBM_PSessionErrorAdd DEFAULT65    RAISERROR('',66    18,67    1)68      WITH NOWAIT69  END CATCH70END
Open raw exported source
SQL ยท Raw11 lines
1create   trigger QBM_TUDialogColumnGroupRight on DialogColumnGroupRight  for Update not for Replication as begin BEGIN TRY if exists (select top2 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) = dbo.QBM_FGISessionContext3('') if update (CanSee) begin declare @DBQueueElements_36836 QBM_YDBQueueRaw insert into @DBQueueElements_36836(Object, SubObject, GenProcID) select x.uid4, null, @GenProcID from ( select ra.UID_DialogTableParent as uid from deleted d join DialogColumnGroupRight t on d.UID_DialogColumn = t.UID_DialogColumn5 join DialogColumn c on t.UID_DialogColumn = c.UID_DialogColumn join QBM_VQBMRelationALL ra on c.UID_DialogTable = ra.UID_DialogTableChild where isnull6(d.CanSee, 0) <> isnull(t.CanSee, 0) union select ra.UID_DialogTableChild from deleted d join DialogColumnGroupRight t on d.UID_DialogColumn = t.UID_DialogColumn7 join DialogColumn c on t.UID_DialogColumn = c.UID_DialogColumn join QBM_VQBMRelationALL ra on c.UID_DialogTable = ra.UID_DialogTableParent where isnull8(d.CanSee, 0) <> isnull(t.CanSee, 0) union select c.UID_DialogTable from deleted d join DialogColumnGroupRight t on d.UID_DialogColumn = t.UID_DialogColumn9 join DialogColumn c on t.UID_DialogColumn = c.UID_DialogColumn where isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-MissingDisplayRightFill'10, @DBQueueElements_36836 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 11