dbo.QER_TUQERWorkingStep
Database TriggerSQL_TRIGGERSandbox DB
Interpretation
- Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
Relations
- Trigger parent table: QERWorkingStep
Typed Edges
- trigger on table QERWorkingStep Trigger parent table: QERWorkingStep
- references source dbo.QBM_FGIColumnUpdatedOthers source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_PGIQERWorkingMethod source text reference
References
- dbo.QBM_FGIColumnUpdatedOthers
- dbo.QBM_FGISessionContext
- dbo.QBM_PSessionErrorAdd
- dbo.QER_PGIQERWorkingMethod
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger QER_TUQERWorkingStep2 ON QERWorkingStep FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @Message nvarchar(1000) = '#LDS#Changes on working table {0} are not allowed.|QERWorkingStep|'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 IF dbo.QBM_FGISessionContext('QER_PGIQERWorkingMethod') > ' '18 BEGIN19 GOTO endlabel20 END21 IF dbo.QBM_FGIColumnUpdatedOthers('QERWorkingStep',22 'XObjectKey',23 COLUMNS_UPDATED()) = 1 AND dbo.QBM_FGIColumnUpdatedOthers('QERWorkingStep',24 'UID_PWODecisionStep',25 COLUMNS_UPDATED()) = 126 BEGIN27 IF EXISTS(28 SELECT TOP 1 129 FROM inserted)30 BEGIN31 RAISERROR(@Message,32 18,33 1)34 WITH nowait35 END36 END37 IF38 UPDATE(UID_PWODecisionStep)39 BEGIN40 IF EXISTS(41 SELECT TOP 1 142 FROM deleted d43 JOIN QERWorkingStep s44 ON d.UID_QERWorkingStep = s.UID_QERWorkingStep45 WHERE46 ISNULL(d.UID_PWODecisionStep, '') <> ISNULL(s.UID_PWODecisionStep, '') AND s.UID_PWODecisionStep > ' ')47 BEGIN48 RAISERROR(@Message,49 18,50 1)51 WITH nowait52 END53 END54 END TRY55 BEGIN CATCH56 EXEC QBM_PSessionErrorAdd DEFAULT57 RAISERROR('',58 18,59 1)60 WITH NOWAIT61 END CATCH62 endLabel:63 RETURN64END
Open raw exported source
1 create trigger QER_TUQERWorkingStep on QERWorkingStep for Update not for Replication as begin declare @Message nvarchar(1000) = '#LDS#Changes on working table {0} are not allowed.|QERWorkingStep|'2 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 dbo.QBM_FGISessionContext3('QER_PGIQERWorkingMethod') > ' ' begin goto endlabel end if dbo.QBM_FGIColumnUpdatedOthers('QERWorkingStep', 'XObjectKey', COLUMNS_UPDATED()) = 1 and4 dbo.QBM_FGIColumnUpdatedOthers('QERWorkingStep', 'UID_PWODecisionStep', COLUMNS_UPDATED()) = 1 begin if exists (select top 1 1 from inserted ) begin raiserror5(@Message, 18, 1) with nowait end end if UPDATE (UID_PWODecisionStep) begin if exists (select top 1 1 from deleted d join QERWorkingStep s on d.UID_QERWorkingStep6 = s.UID_QERWorkingStep where ISNULL(d.UID_PWODecisionStep, '') <> ISNULL(s.UID_PWODecisionStep, '') and s.UID_PWODecisionStep > ' ' ) begin raiserror(@Message7, 18, 1) with nowait end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end 8