dbo.QBM_ZPrePropGroup
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
- DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.
Relations
- Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 11
- References QBM_PDBQueueInsert_Single
Typed Edges
- queues DBQueue task QBM_ZRecalculate at line 11 Single DBQueue insert -> QBM-K-CommonReCalculate / QBM_ZRecalculate at line 11
- references source dbo.QBM_FGIPrepropConditionDeactiv source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- queues DBQueue task QBM-K-CommonReCalculate -> QBM_ZRecalculate QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate' , 'QBM-K-CommonGroupCollection', '', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet…
References
- dbo.QBM_FGIPrepropConditionDeactiv
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PSessionContextSet
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_ZPrePropGroup(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @GenProcID varchar(38)7 DECLARE @CountItems int8 DECLARE @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('')9 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent10 BEGIN TRY11 INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,12 UID_Parameter,13 UID_SubParameter,14 GenProcID)15 SELECT16 UID_DialogDBQueue,17 UID_Parameter,18 UID_SubParameter,19 GenProcID20 FROM QBMDBQueueCurrent cu21 WITH(readpast)22 WHERE23 cu.SlotNumber = @SlotNumber24 IF @@rowcount = 025 BEGIN26 GOTO EndLabel27 END28 SELECT @GenProcID = max(GenProcID)29 FROM @DBQueueCurrent30 WHERE31 GenProcID > ' '32 IF isnull(@Genprocid,33 '') = ''34 BEGIN35 SELECT @GenProcID = newid()36 END37 DECLARE @PrePropHelper QBM_YPrepropHelper38 INSERT INTO @PrePropHelper(uid_parameter,39 IsDeactivated,40 IsDeactivatedOld,41 GenProcID,42 PreProcessorCondition)43 SELECT44 x.uid_parameter,45 0,46 g.isDeactivatedByPreProcessor,47 x.GenProcID,48 isnull(g.PreProcessorCondition,49 N '')50 FROM @DBQueueCurrent x51 JOIN dialogGroup g52 ON x.uid_parameter = g.UID_DialogGroup53 UPDATE @PrePropHelper54 SET IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition)55 FROM @PrePropHelper h56 WHERE57 h.PreProcessorCondition > ' '58 EXEC QBM_PSessionContextSet 'GenProcID',59 @GenProcID60 UPDATE DialogGroup61 SET IsDeactivatedByPreProcessor = x.isDeactivated,62 xdateupdated = GetUTCDate(),63 xuserupdated = 'DBScheduler'64 FROM DialogGroup r65 JOIN @PrePropHelper x66 ON r.UID_DialogGroup = x.uid_parameter67 WHERE68 (r.IsDeactivatedByPreProcessor <> x.IsDeactivated OR x.IsDeactivated = 1)69 SELECT @CountItems = @@rowcount70 IF @CountItems > 071 BEGIN72 EXEC QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate',73 'QBM-K-CommonGroupCollection',74 '',75 @GenProcID76 END77 END TRY78 BEGIN CATCH79 EXEC QBM_PSessionErrorAdd DEFAULT80 RAISERROR('',81 18,82 1)83 WITH NOWAIT84 END CATCH85 endLabel:86 EXEC QBM_PSessionContextSet 'GenProcID',87 @GenProcID_R88 RETURN89END
Open raw exported source
1 create procedure QBM_ZPrePropGroup (@SlotNumber int) as begin declare @GenProcID varchar(38) declare @CountItems int declare @GenProcID_R2 varchar(38) = dbo.QBM_FGISessionContext('') declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter3, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber4 = @SlotNumber if @@rowcount = 0 begin goto EndLabel end select @GenProcID = max(GenProcID) from @DBQueueCurrent where GenProcID > ' ' if isnull(@Genprocid5, '') = '' begin select @GenProcID = newid() end declare @PrePropHelper QBM_YPrepropHelper insert into @PrePropHelper (uid_parameter , IsDeactivated , 6IsDeactivatedOld, GenProcID , PreProcessorCondition) select x.uid_parameter, 0 , g.isDeactivatedByPreProcessor , x.GenProcID, isnull(g.PreProcessorCondition7,N'') from @DBQueueCurrent x join dialogGroup g on x.uid_parameter = g.UID_DialogGroup update @PrePropHelper set IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv8(h.PreProcessorCondition) from @PrePropHelper h where h.PreProcessorCondition > ' ' exec QBM_PSessionContextSet 'GenProcID', @GenProcID update DialogGroup9 set IsDeactivatedByPreProcessor = x.isDeactivated, xdateupdated = GetUTCDate(), xuserupdated = 'DBScheduler' from DialogGroup r join @PrePropHelper x10 on r.UID_DialogGroup = x.uid_parameter where( r.IsDeactivatedByPreProcessor <> x.IsDeactivated or x.IsDeactivated = 1 ) select @CountItems = @@rowcount11 if @CountItems > 0 begin exec QBM_PDBQueueInsert_Single 'QBM-K-CommonReCalculate' , 'QBM-K-CommonGroupCollection', '', @GenProcID end END TRY BEGIN CATCH12 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R return end13 14