dbo.QBM_PProcessShrink
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_PDialogProcessShrink_3 source text reference
- references source dbo.QBM_PDialogProcessShrink_mark source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
Complete Source
1CREATE PROCEDURE QBM_PProcessShrink(2 @KeyPattern varchar(25) = '%'3)4AS5BEGIN6 DECLARE @CountItems int7 SET XACT_ABORT OFF8 BEGIN TRY9 SET nocount10 ON11 EXEC QBM_PDialogProcessShrink_3 @CountItems OUTPUT,12 @KeyPattern13 EXEC QBM_PDialogProcessShrink_mark @KeyPattern14 UPDATE DialogProcessSubstitute15 SET ReadyForDeleteOrExport = 116 FROM DialogProcessSubstitute s17 WHERE18 s.GenProcIDNew IN(19 SELECT GenProcID20 FROM dialogprocess p21 WHERE22 p.ReadyForDeleteOrExport = 1 AND p.GenProcID LIKE @KeyPattern) AND s.ReadyForDeleteOrExport <> 123 UPDATE DialogProcessSubstitute24 SET ReadyForDeleteOrExport = 125 FROM DialogProcessSubstitute s26 WHERE27 s.GenProcIDOrigin IN(28 SELECT GenProcID29 FROM dialogprocess p30 WHERE31 p.ReadyForDeleteOrExport = 1 AND p.GenProcID LIKE @KeyPattern) AND s.ReadyForDeleteOrExport <> 132 EXEC QBM_PDialogProcessShrink_3 @CountItems OUTPUT,33 @KeyPattern34 END TRY35 BEGIN CATCH36 EXEC QBM_PSessionErrorAdd DEFAULT37 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()38 RAISERROR(@Rethrow,39 18,40 1)41 WITH NOWAIT42 END CATCH43 ende:44 RETURN45END
Open raw exported source
1 create procedure QBM_PProcessShrink (@KeyPattern varchar(25) = '%' ) as begin declare @CountItems int SET XACT_ABORT OFF BEGIN TRY set nocount2 on exec QBM_PDialogProcessShrink_3 @CountItems output, @KeyPattern exec QBM_PDialogProcessShrink_mark @KeyPattern update DialogProcessSubstitute3 set ReadyForDeleteOrExport = 1 from DialogProcessSubstitute s where s.GenProcIDNew in ( select GenProcID from dialogprocess p where p.ReadyForDeleteOrExport4 = 1 and p.GenProcID like @KeyPattern ) and s.ReadyForDeleteOrExport <> 1 update DialogProcessSubstitute set ReadyForDeleteOrExport = 1 from DialogProcessSubstitute5 s where s.GenProcIDOrigin in ( select GenProcID from dialogprocess p where p.ReadyForDeleteOrExport = 1 and p.GenProcID like @KeyPattern ) and s.ReadyForDeleteOrExport6 <> 1 exec QBM_PDialogProcessShrink_3 @CountItems output, @KeyPattern END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(10007) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return end 8