Back to OIM Explorer

dbo.QBM_TUDialogScriptAssembly

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on DialogScriptAssembly. Trigger parent table: DialogScriptAssembly

Source: sandbox-db sys.sql_modules

Source size: 637 characters

Interpretation

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

Relations

  • Trigger parent table: DialogScriptAssembly

Typed Edges

  • trigger on table DialogScriptAssembly Trigger parent table: DialogScriptAssembly
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL37 lines
1CREATE trigger QBM_TUDialogScriptAssembly2  ON DialogScriptAssembly FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @xdate datetime = getutcdate()7  DECLARE @XUser nvarchar(64)8  BEGIN TRY9    IF EXISTS(10      SELECT TOP 1 111      FROM inserted)12    GOTO start13    IF EXISTS(14      SELECT TOP 1 115      FROM deleted)16    GOTO start17    RETURN start:18    SELECT @xuser = dbo.QBM_FGISessionContext('XUser')19    IF20    UPDATE(Assembly)21    BEGIN22      UPDATE dialogSemaphor23      SET ChangeCounter = ChangeCounter +1,24      XDateUpdated = @XDate,25      XUserUpdated = @XUser26      WHERE27        ChangeContext = 'ASSEMBLY'28    END29  END TRY30  BEGIN CATCH31    EXEC QBM_PSessionErrorAdd DEFAULT32    RAISERROR('',33    18,34    1)35      WITH NOWAIT36  END CATCH37END
Open raw exported source
SQL ยท Raw6 lines
1 create   trigger QBM_TUDialogScriptAssembly on DialogScriptAssembly  for Update not for Replication as begin declare @xdate datetime = getutcdate2() declare @XUser nvarchar(64) BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return 3start: select @xuser = dbo.QBM_FGISessionContext('XUser') if update(Assembly) begin update dialogSemaphor set ChangeCounter = ChangeCounter +1 , XDateUpdated4 = @XDate , XUserUpdated = @XUser where ChangeContext = 'ASSEMBLY' end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH5 NOWAIT END CATCH end 6