Back to OIM Explorer

dbo.QBM_PQBMRelationUserChangeCorr

Stored ProcedureSQL_STORED_PROCEDURESandbox DB

Stored Procedure.

Source: sandbox-db sys.sql_modules

Source size: 1.570 characters

Interpretation

  • Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.

Relations

  • No extracted relations.

Typed Edges

  • references source dbo.QBM_FGISessionErrorRethrow source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL63 lines
1CREATE PROCEDURE QBM_PQBMRelationUserChangeCorr2AS3BEGIN4  DECLARE @XUser nvarchar(64) = object_name(@@procid)5  DECLARE @Xdate datetime = getutcdate()6  SET XACT_ABORT OFF7  BEGIN TRY8    UPDATE QBMRelation9    SET ParentExecuteBy =10    LEFT(cf.ContentShort,11    1),12    XDateUpdated = @Xdate,13    XUserUpdated = @XUser14    FROM QBMBufferConfig cf15    JOIN QBMRelation r16      ON cf.ObjectKeyOfRow = r.XObjectKey17    WHERE18      cf.TableName = 'QBMRelation' AND cf.ColumnName = 'ParentExecuteBy' AND r.ParentAllowUpdate = 019    UPDATE QBMRelation20    SET ParentRestriction =21    LEFT(cf.ContentShort,22    2),23    XDateUpdated = @Xdate,24    XUserUpdated = @XUser25    FROM QBMBufferConfig cf26    JOIN QBMRelation r27      ON cf.ObjectKeyOfRow = r.XObjectKey28    WHERE29      cf.TableName = 'QBMRelation' AND cf.ColumnName = 'ParentRestriction' AND r.ParentAllowUpdate = 030    UPDATE QBMRelation31    SET ChildExecuteBy =32    LEFT(cf.ContentShort,33    1),34    XDateUpdated = @Xdate,35    XUserUpdated = @XUser36    FROM QBMBufferConfig cf37    JOIN QBMRelation r38      ON cf.ObjectKeyOfRow = r.XObjectKey39    WHERE40      cf.TableName = 'QBMRelation' AND cf.ColumnName = 'ChildExecuteBy' AND r.ChildAllowUpdate = 041    UPDATE QBMRelation42    SET ChildRestriction =43    LEFT(cf.ContentShort,44    2),45    XDateUpdated = @Xdate,46    XUserUpdated = @XUser47    FROM QBMBufferConfig cf48    JOIN QBMRelation r49      ON cf.ObjectKeyOfRow = r.XObjectKey50    WHERE51      cf.TableName = 'QBMRelation' AND cf.ColumnName = 'ChildRestriction' AND r.ChildAllowUpdate = 052  END TRY53  BEGIN CATCH54    EXEC QBM_PSessionErrorAdd DEFAULT55    DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()56    RAISERROR(@Rethrow,57    18,58    1)59      WITH NOWAIT60  END CATCH61  ende:62  RETURN63END
Open raw exported source
SQL ยท Raw11 lines
1  create   procedure QBM_PQBMRelationUserChangeCorr as begin declare @XUser nvarchar(64) = object_name(@@procid) declare @Xdate datetime = getutcdate2() SET XACT_ABORT OFF BEGIN TRY update QBMRelation set ParentExecuteBy = LEFT(cf.ContentShort, 1) , XDateUpdated = @Xdate , XUserUpdated = @XUser  from3 QBMBufferConfig cf join QBMRelation r on cf.ObjectKeyOfRow = r.XObjectKey where cf.TableName = 'QBMRelation' and cf.ColumnName = 'ParentExecuteBy' and4 r.ParentAllowUpdate = 0 update QBMRelation set ParentRestriction = LEFT(cf.ContentShort, 2) , XDateUpdated = @Xdate , XUserUpdated = @XUser  from QBMBufferConfig5 cf join QBMRelation r on cf.ObjectKeyOfRow = r.XObjectKey where cf.TableName = 'QBMRelation' and cf.ColumnName = 'ParentRestriction' and r.ParentAllowUpdate6 = 0 update QBMRelation set ChildExecuteBy = LEFT(cf.ContentShort, 1) , XDateUpdated = @Xdate , XUserUpdated = @XUser  from QBMBufferConfig cf join QBMRelation7 r on cf.ObjectKeyOfRow = r.XObjectKey where cf.TableName = 'QBMRelation' and cf.ColumnName = 'ChildExecuteBy' and r.ChildAllowUpdate = 0 update QBMRelation8 set ChildRestriction = LEFT(cf.ContentShort, 2) , XDateUpdated = @Xdate , XUserUpdated = @XUser  from QBMBufferConfig cf join QBMRelation r on cf.ObjectKeyOfRow9 = r.XObjectKey where cf.TableName = 'QBMRelation' and cf.ColumnName = 'ChildRestriction' and r.ChildAllowUpdate = 0 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd10 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return end 11