dbo.QER_ZITShopCheckMethodPR
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 -> QER-K-ShoppingRackPWODecisionMaker / QER_ZITShopDecisionMakerFill at line 8
- References QBM_PDBQueueInsert_Single
Typed Edges
- queues DBQueue task QER_ZITShopDecisionMakerFill at line 8 Single DBQueue insert -> QER-K-ShoppingRackPWODecisionMaker / QER_ZITShopDecisionMakerFill at line 8
- references source dbo.QBM_PDBQueueInsert_Single source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QER_ZITShopCheck source text reference
- references source dbo.QER_FTMethodForPRNode source text reference
- queues DBQueue task QER-K-ShoppingRackPWODecisionMaker -> QER_ZITShopDecisionMakerFill QBM_PDBQueueInsert_Single 'QER-K-ShoppingRackPWODecisionMaker', '', '', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end
References
- dbo.QBM_PDBQueueInsert_Single
- dbo.QBM_PSessionErrorAdd
- dbo.QER_ZITShopCheck
- dbo.QER_FTMethodForPRNode
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QER_ZITShopCheckMethodPR(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @GenprocID varchar(38)7 DECLARE @XUser nvarchar(64) = object_name(@@procid)8 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent9 DECLARE @PRNodes QBM_YSingleGUID10 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 INSERT INTO @PRNodes(UID_SingleGuid)29 SELECT UID_Parameter30 FROM @DBQueueCurrent cu31 IF @@rowcount = 032 BEGIN33 GOTO EndLabel34 END35 UPDATE BaseTree36 SET UID_PWODecisionMethod = m.UID_PWODecisionMethod,37 XDateUpdated = GETUTCDATE(),38 XUserUpdated = @XUser39 FROM BaseTree b40 JOIN dbo.QER_FTMethodForPRNode(@PRNodes) m41 ON b.UID_Org = m.UID_OrgPR42 WHERE43 isnull(m.UID_PWODecisionMethod,44 '') <>isnull(m.UID_PWODecisionMethod_old,45 '')46 IF @@ROWCOUNT > 047 BEGIN48 SELECT @GenprocID = max(cu.GenProcID)49 FROM @DBQueueCurrent cu50 IF @GenprocID IS NULL51 BEGIN52 SELECT @GenprocID = NEWID()53 END54 EXEC QBM_PDBQueueInsert_Single 'QER-K-ShoppingRackPWODecisionMaker',55 '',56 '',57 @GenProcID58 END59 END TRY60 BEGIN CATCH61 EXEC QBM_PSessionErrorAdd DEFAULT62 RAISERROR('',63 18,64 1)65 WITH NOWAIT66 END CATCH67 endLabel:68 RETURN69END
Open raw exported source
1 create procedure QER_ZITShopCheckMethodPR (@SlotNumber int) as begin declare @GenprocID varchar(38) declare @XUser nvarchar(64) = object_name2(@@procid) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @PRNodes QBM_YSingleGUID 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 insert into @PRNodes(UID_SingleGuid) select UID_Parameter from @DBQueueCurrent cu if @@rowcount5 = 0 begin goto EndLabel end update BaseTree set UID_PWODecisionMethod = m.UID_PWODecisionMethod , XDateUpdated = GETUTCDATE() , XUserUpdated = @XUser6 from BaseTree b join dbo.QER_FTMethodForPRNode(@PRNodes) m on b.UID_Org = m.UID_OrgPR where isnull(m.UID_PWODecisionMethod, '') <>isnull(m.UID_PWODecisionMethod_old7, '') if @@ROWCOUNT > 0 begin select @GenprocID = max(cu.GenProcID) from @DBQueueCurrent cu if @GenprocID is null begin select @GenprocID = NEWID() end8 exec QBM_PDBQueueInsert_Single 'QER-K-ShoppingRackPWODecisionMaker', '', '', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR9 ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end 10