dbo.QBM_ZPrePropTreeResult
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
- Bulk DBQueue insert -> QBM-K-CommonPrepropSheet / QBM_ZPrePropSheet at line 12
- Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 12
- Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 15
- References QBM_PDBQueueInsert_Bulk
Typed Edges
- queues DBQueue task QBM_ZPrePropSheet at line 12 Bulk DBQueue insert -> QBM-K-CommonPrepropSheet / QBM_ZPrePropSheet at line 12
- queues DBQueue task QBM_ZPrePropTree at line 12 Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 12
- queues DBQueue task QBM_ZPrePropTree at line 15 Bulk DBQueue insert -> QBM-K-CommonPrepropTree / QBM_ZPrePropTree at line 15
- references source dbo.QBM_FGIPrepropConditionDeactiv source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PDBQueueInsert_WaitForComp source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QBM_ZPrePropTree source text reference
- queues DBQueue task QBM-K-CommonPrepropSheet -> QBM_ZPrePropSheet QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct thr.UID…
- queues DBQueue task QBM-K-CommonPrepropTree -> QBM_ZPrePropTree QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree', @DBQueueElements_02 exec QBM_PSessionContextSet 'GenProcID', @GenProcID update QBMTreeResult set IsDeactivatedByPreProcessor = x.isDeactivated, xdateupdated = GetUTCDate(), xuserupdated = …
References
- dbo.QBM_FGIPrepropConditionDeactiv
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PDBQueueInsert_WaitForComp
- dbo.QBM_PSessionContextSet
- dbo.QBM_PSessionErrorAdd
- dbo.QBM_ZPrePropTree
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QBM_ZPrePropTreeResult(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @CountItems int7 DECLARE @GenProcID varchar(38)8 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 isDeactivatedPrior,40 IsDeactivated,41 GenProcID,42 PreProcessorCondition,43 IsDeactivatedOld)44 SELECT45 x.uid_parameter,46 isnull(o.isDeactivatedByPreProcessor,47 0),48 isnull(o.isDeactivatedByPreProcessor,49 0),50 x.GenProcID,51 isnull(t.PreProcessorCondition,52 N ''),53 t.isDeactivatedByPreProcessor54 FROM @DBQueueCurrent x55 JOIN QBMTreeResult t56 ON x.uid_parameter = t.uid_QBMTreeResult57 LEFT58 OUTER59 JOIN DialogObject o60 ON t.UID_DialogObject = o.UID_DialogObject61 UPDATE @PrePropHelper62 SET IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition)63 FROM @PrePropHelper h64 WHERE65 h.PreProcessorCondition > ' ' AND h.isDeactivatedPrior = 066 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw67 INSERT INTO @DBQueueElements_01(object,68 subobject,69 genprocid)70 SELECT71 x.uid,72 NULL,73 @GenProcID74 FROM(75 SELECT76 DISTINCT ths.UID_DialogSheet AS UID,77 x.GenProcID78 FROM QBMTreeResult t79 JOIN @PrePropHelper x80 ON isnull(t.UID_QBMTreeResult, '') = x.uid_parameter AND isnull(t.IsDeactivatedByPreProcessor, 0) <> x.IsDeactivated81 JOIN QBMTreeResultHasSheet ths82 ON ths.uid_QBMTreeResult = t.uid_QBMTreeResult) AS x83 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet',84 @DBQueueElements_0185 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw86 INSERT INTO @DBQueueElements_02(object,87 subobject,88 genprocid)89 SELECT90 x.uid,91 NULL,92 @GenProcID93 FROM(94 SELECT95 DISTINCT thr.UID_QBMTree AS UID,96 x.GenProcID97 FROM QBMTreeResult tr98 JOIN @PrePropHelper x99 ON isnull(tr.UID_QBMTreeResult, '') = x.uid_parameter AND isnull(tr.IsDeactivatedByPreProcessor, 0) <> x.IsDeactivated100 JOIN QBMTreeHasTreeResult thr101 ON tr.uid_QBMTreeResult = thr.uid_QBMTreeResult) AS x102 EXEC QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree',103 @DBQueueElements_02104 EXEC QBM_PSessionContextSet 'GenProcID',105 @GenProcID106 UPDATE QBMTreeResult107 SET IsDeactivatedByPreProcessor = x.isDeactivated,108 xdateupdated = GetUTCDate(),109 xuserupdated = 'DBScheduler'110 FROM QBMTreeResult r111 JOIN @PrePropHelper x112 ON r.UID_QBMTreeResult = x.uid_parameter113 WHERE114 r.IsDeactivatedByPreProcessor <> x.IsDeactivated115 SELECT @CountItems = @@rowcount116 IF @CountItems > 0117 BEGIN118 EXEC QBM_PDBQueueInsert_WaitForComp 'Tree',119 @GenProcID120 END121 END TRY122 BEGIN CATCH123 EXEC QBM_PSessionErrorAdd DEFAULT124 RAISERROR('',125 18,126 1)127 WITH NOWAIT128 END CATCH129 endLabel:130 EXEC QBM_PSessionContextSet 'GenProcID',131 @GenProcID_R132 RETURN133END
Open raw exported source
1 create procedure QBM_ZPrePropTreeResult (@SlotNumber int) as begin declare @CountItems int declare @GenProcID varchar(38) 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 , isDeactivatedPrior6 , IsDeactivated , GenProcID , PreProcessorCondition, IsDeactivatedOld) select x.uid_parameter , isnull(o.isDeactivatedByPreProcessor, 0) , isnull(o.isDeactivatedByPreProcessor7, 0) , x.GenProcID, isnull(t.PreProcessorCondition,N''), t.isDeactivatedByPreProcessor from @DBQueueCurrent x join QBMTreeResult t on x.uid_parameter =8 t.uid_QBMTreeResult left outer join DialogObject o on t.UID_DialogObject = o.UID_DialogObject update @PrePropHelper set IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv9(h.PreProcessorCondition) from @PrePropHelper h where h.PreProcessorCondition > ' ' and h.isDeactivatedPrior = 0 declare @DBQueueElements_01 QBM_YDBQueueRaw10 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct ths.UID_DialogSheet as UID, x.GenProcID11 from QBMTreeResult t join @PrePropHelper x on isnull(t.UID_QBMTreeResult,'') = x.uid_parameter and isnull(t.IsDeactivatedByPreProcessor,0) <> x.IsDeactivated12 join QBMTreeResultHasSheet ths on ths.uid_QBMTreeResult = t.uid_QBMTreeResult ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet', @DBQueueElements_0113 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select14 distinct thr.UID_QBMTree as UID, x.GenProcID from QBMTreeResult tr join @PrePropHelper x on isnull(tr.UID_QBMTreeResult,'') = x.uid_parameter and isnull15(tr.IsDeactivatedByPreProcessor,0) <> x.IsDeactivated join QBMTreeHasTreeResult thr on tr.uid_QBMTreeResult = thr.uid_QBMTreeResult ) as x exec QBM_PDBQueueInsert_Bulk16 'QBM-K-CommonPrepropTree', @DBQueueElements_02 exec QBM_PSessionContextSet 'GenProcID', @GenProcID update QBMTreeResult set IsDeactivatedByPreProcessor17 = x.isDeactivated, xdateupdated = GetUTCDate(), xuserupdated = 'DBScheduler' from QBMTreeResult r join @PrePropHelper x on r.UID_QBMTreeResult = x.uid_parameter18 where r.IsDeactivatedByPreProcessor <> x.IsDeactivated select @CountItems = @@rowcount if @CountItems > 0 begin exec QBM_PDBQueueInsert_WaitForComp 19'Tree', @GenProcID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet20 'GenProcID', @GenProcID_R return end 21