dbo.QBM_PDialogProcessShrink_mark
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
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 source dbo.QBM_FTDialogProcessReady source text reference
References
Referenced By
Complete Source
1CREATE PROCEDURE QBM_PDialogProcessShrink_mark(2 @KeyPattern varchar(25)3)4AS5BEGIN6 DECLARE @Worktable QBM_YSingleGUID7 DECLARE @DebugSwitch int = 08 DECLARE @XUser nvarchar(64) = object_name(@@procid)9 DECLARE @Xdate datetime = getutcdate()10 SET XACT_ABORT OFF11 BEGIN TRY12 INSERT INTO @Worktable(UID_SingleGuid)13 SELECT p.GenProcID14 FROM DialogProcess p15 WHERE16 p.ReadyForDeleteOrExport = 0 AND p.GenProcID LIKE @KeyPattern17 IF @DebugSwitch > 018 BEGIN19 print '--- s1'20 SELECT *21 FROM @Worktable22 END23 UPDATE DialogProcess24 SET ReadyForDeleteOrExport = w.ReadyForDeleteOrExport,25 XDateUpdated = @Xdate,26 XUserUpdated = @XUser27 FROM DialogProcess p28 JOIN dbo.QBM_FTDialogProcessReady(@Worktable) w29 ON p.GenProcID = w.GenProcID30 WHERE31 p.ReadyForDeleteOrExport <> w.ReadyForDeleteOrExport32 END TRY33 BEGIN CATCH34 EXEC QBM_PSessionErrorAdd DEFAULT35 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()36 RAISERROR(@Rethrow,37 18,38 1)39 WITH NOWAIT40 END CATCH41END
Open raw exported source
1 create procedure QBM_PDialogProcessShrink_mark (@KeyPattern varchar(25) ) as begin declare @Worktable QBM_YSingleGUID declare @DebugSwitch2 int = 0 declare @XUser nvarchar(64) = object_name(@@procid) declare @Xdate datetime = getutcdate() SET XACT_ABORT OFF BEGIN TRY insert into @Worktable3(UID_SingleGuid ) select p.GenProcID from DialogProcess p where p.ReadyForDeleteOrExport = 0 and p.GenProcID like @KeyPattern if @DebugSwitch > 0 begin4 print '--- s1' select * from @Worktable end update DialogProcess set ReadyForDeleteOrExport = w.ReadyForDeleteOrExport , XDateUpdated = @Xdate , XUserUpdated5 = @XUser from DialogProcess p join dbo.QBM_FTDialogProcessReady(@Worktable) w on p.GenProcID = w.GenProcID where p.ReadyForDeleteOrExport <> w.ReadyForDeleteOrExport6 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH7 NOWAIT END CATCH end 8