Back to OIM Explorer

dbo.QBM_TUDialogTableGroupRight

Database TriggerSQL_TRIGGERSandbox DB

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

Source: sandbox-db sys.sql_modules

Source size: 1.596 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 10
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: DialogTableGroupRight

Typed Edges

  • queues DBQueue task QBM_ZMissingDisplayRightFill at line 10 Bulk DBQueue insert -> QBM-K-MissingDisplayRightFill / QBM_ZMissingDisplayRightFill at line 10
  • trigger on table DialogTableGroupRight Trigger parent table: DialogTableGroupRight
  • 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_TUDialogTable source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL68 lines
1CREATE trigger QBM_TUDialogTableGroupRight2  ON DialogTableGroupRight 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) OR19    UPDATE(SelectWhereClause)20    BEGIN21      DECLARE @DBQueueElements_36836 QBM_YDBQueueRaw22      INSERT INTO @DBQueueElements_36836(Object,23      SubObject,24      GenProcID)25      SELECT26        x.uid,27        NULL,28        @GenProcID29      FROM(30      SELECT ra.UID_DialogTableParent AS uid31      FROM deleted d32      JOIN DialogTableGroupRight t33        ON d.UID_DialogTable = t.UID_DialogTable34      JOIN QBM_VQBMRelationALL ra35        ON t.UID_DialogTable = ra.UID_DialogTableChild36      WHERE37        isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) OR isnull(d.SelectWhereClause, '') <> isnull(t.SelectWhereClause,38      '')39      UNION40      SELECT ra.UID_DialogTableChild41      FROM deleted d42      JOIN DialogTableGroupRight t43        ON d.UID_DialogTable = t.UID_DialogTable44      JOIN QBM_VQBMRelationALL ra45        ON t.UID_DialogTable = ra.UID_DialogTableParent46      WHERE47        isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) OR isnull(d.SelectWhereClause, '') <> isnull(t.SelectWhereClause,48      '')49      UNION50      SELECT t.UID_DialogTable51      FROM deleted d52      JOIN DialogTableGroupRight t53        ON d.UID_DialogTable = t.UID_DialogTable54      WHERE55        isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) OR isnull(d.SelectWhereClause, '') <> isnull(t.SelectWhereClause,56      '')) AS x57      EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-MissingDisplayRightFill',58        @DBQueueElements_3683659    END60  END TRY61  BEGIN CATCH62    EXEC QBM_PSessionErrorAdd DEFAULT63    RAISERROR('',64    18,65    1)66      WITH NOWAIT67  END CATCH68END
Open raw exported source
SQL ยท Raw12 lines
1create   trigger QBM_TUDialogTableGroupRight on DialogTableGroupRight  for Update not for Replication as begin BEGIN TRY if exists (select top 12 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) or update(SelectWhereClause) begin declare @DBQueueElements_36836 QBM_YDBQueueRaw insert into @DBQueueElements_36836(Object, SubObject4, GenProcID) select x.uid, null, @GenProcID from ( select ra.UID_DialogTableParent as uid from deleted d join DialogTableGroupRight t on d.UID_DialogTable5 = t.UID_DialogTable join QBM_VQBMRelationALL ra on t.UID_DialogTable = ra.UID_DialogTableChild where isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) or isnull6(d.SelectWhereClause, '') <> isnull(t.SelectWhereClause, '') union select ra.UID_DialogTableChild from deleted d join DialogTableGroupRight t on d.UID_DialogTable7 = t.UID_DialogTable join QBM_VQBMRelationALL ra on t.UID_DialogTable = ra.UID_DialogTableParent where isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) or isnull8(d.SelectWhereClause, '') <> isnull(t.SelectWhereClause, '') union select t.UID_DialogTable from deleted d join DialogTableGroupRight t on d.UID_DialogTable9 = t.UID_DialogTable where isnull(d.CanSee, 0) <> isnull(t.CanSee, 0) or isnull(d.SelectWhereClause, '') <> isnull(t.SelectWhereClause, '') ) as x exec10 QBM_PDBQueueInsert_Bulk 'QBM-K-MissingDisplayRightFill', @DBQueueElements_36836 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR (11'', 18, 1) WITH NOWAIT END CATCH end 12