dbo.QBM_ZPrePropTree
SQL_STORED_PROCEDURE
Created 2025-06-27T17:58:58.340 · modified 2026-04-14T23:20:28.953 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogDashBoardDef | OBJECT_OR_COLUMN | ||
| DialogTable | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_WaitForComp | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YPrepropHelper | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| QBMTree | OBJECT_OR_COLUMN | ||
| QBMTreeHasSheet | OBJECT_OR_COLUMN | ||
| QBMTreeHasTreeResult | OBJECT_OR_COLUMN | ||
| QBMTreeResult | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIPrepropConditionDeactiv | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QBM_ZPrePropTree (@SlotNumber int) as begin declare @CountItems int declare @GenProcID varchar(38) declare @GenProcID_R varchar 2(38) = dbo.QBM_FGISessionContext('') declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter 3, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber 4 = @SlotNumber if @@rowcount = 0 begin goto EndLabel end select @GenProcID = max(GenProcID) from @DBQueueCurrent where GenProcID > ' ' if isnull(@Genprocid 5, '') = '' begin select @GenProcID = newid() end declare @PrePropHelper QBM_YPrepropHelper insert into @PrePropHelper (uid_parameter , isDeactivatedPrior 6 , IsDeactivated , GenProcID , PreProcessorCondition, IsDeactivatedOld) select x.uid_parameter , sign(cast(isnull(p.isDeactivatedByPreProcessor,0)as int 7) + cast(isnull(tb.isDeactivatedByPreProcessor,0)as int) + cast(isnull(dd.isDeactivatedByPreProcessor,0)as int) ) , sign(cast(isnull(p.isDeactivatedByPreProcessor 8,0)as int) + cast(isnull(tb.isDeactivatedByPreProcessor,0)as int) + cast(isnull(dd.IsDeactivatedByPreProcessor,0)as int) ), x.GenProcID, isnull(t.PreProcessorCondition 9,N''), t.isDeactivatedByPreProcessor from @DBQueueCurrent x join QBMTree t on x.uid_parameter = t.uid_QBMTree left outer join QBMTree p on t.UID_QBMTreeParent 10 = p.UID_QBMTree left outer join DialogTable tb on t.UID_DialogTable = tb.UID_DialogTable left outer join DialogDashBoardDef dd on t.UID_DialogDashBoardDef 11 = dd.UID_DialogDashBoardDef update @PrePropHelper set IsDeactivated = dbo.QBM_FGIPrepropConditionDeactiv(h.PreProcessorCondition) from @PrePropHelper 12 h where h.PreProcessorCondition > ' ' and h.isDeactivatedPrior = 0 update @PrePropHelper set IsDeactivated = 1 from @PrePropHelper h join QBMTree t on 13 h.UID_Parameter = t.UID_QBMTree where h.IsDeactivated = 0 and t.NodeType <> 'D' and not exists (select top 1 1 from QBMTreeResult r join QBMTreeHasTreeResult 14 thr on r.UID_QBMTreeResult = thr.UID_QBMTreeResult where thr.UID_QBMTree = h.UID_Parameter and r.isDeactivatedByPreProcessor = 0 ) and exists (select 15top 1 1 from QBMTreeResult r join QBMTreeHasTreeResult thr on r.UID_QBMTreeResult = thr.UID_QBMTreeResult where thr.UID_QBMTree = h.UID_Parameter ) and 16 not exists (select top 1 1 from QBMTree c where c.UID_QBMTreeParent = h.uid_parameter and c.IsDeactivatedByPreProcessor = 0 ) declare @DBQueueElements_01 17 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from (select distinct ths.UID_DialogSheet 18 as UID, x.GenProcID from QBMTree t join @PrePropHelper x on isnull(t.UID_QBMTree,'') = x.uid_parameter and isnull(t.IsDeactivatedByPreProcessor,0) <> 19x.IsDeactivated join QBMTreeHasSheet ths on ths.uid_QBMTree = t.uid_QBMTree ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropSheet', @DBQueueElements_01 20 exec QBM_PSessionContextSet 'GenProcID', @GenProcID update QBMTree set IsDeactivatedByPreProcessor = x.isDeactivated, xdateupdated = GetUTCDate(), xuserupdated 21 = 'DBScheduler' from QBMTree r join @PrePropHelper x on r.UID_QBMTree = x.uid_parameter where r.IsDeactivatedByPreProcessor <> x.IsDeactivated select 22 @CountItems = @@rowcount if @CountItems > 0 begin exec QBM_PDBQueueInsert_WaitForComp 'Tree', @GenProcID end declare @DBQueueElements_02 QBM_YDBQueueRaw 23 insert into @DBQueueElements_02 (object, subobject, genprocid) select z.UID, null, z.GenProcID from (select t.UID_QBMTree as UID, x.GenProcID, x.isDeactivated 24, x.isDeactivatedOld from QBMTree t join @PrePropHelper x on t.UID_QBMTreeParent = x.uid_parameter group by t.UID_QBMTree, x.GenProcID, x.isDeactivated 25, x.isDeactivatedOld ) as z where (not exists (select top 1 1 from @PrePropHelper y where y.uid_parameter = z.UID ) or z.isDeactivated <> z.isDeactivatedOld 26 ) exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonPrepropTree', @DBQueueElements_02 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18 27, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R return end 28
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:28.953
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PSessionContextSet, QBM_PDBQueueInsert_WaitForComp, QBM_PSessionErrorAdd; writes INSERT into, UPDATE QBMTree; reads/joins QBMDBQueueCurrent, QBMTree, DialogTable, DialogDashBoardDef, QBMTreeResult…; uses session context GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT into UPDATE QBMTreeCalled routines
Read/join references
SQL dependency metadata
- DialogDashBoardDef
- DialogTable
- QBM_PDBQueueInsert_Bulk
- QBM_PDBQueueInsert_WaitForComp
- QBM_PSessionContextSet
- QBM_PSessionErrorAdd
- QBM_YDBQueueCurrent
- QBM_YDBQueueRaw
- QBM_YPrepropHelper
- QBMDBQueueCurrent
- QBMTree
- QBMTreeHasSheet
- QBMTreeHasTreeResult
- QBMTreeResult
- dbo.QBM_FGIPrepropConditionDeactiv
- dbo.QBM_FGISessionContext
Config/session
Config: None extracted.
Session: GenProcID
DBQueue/tasks
QBM-K-CommonPrepropSheet Tree QBM-K-CommonPrepropTreeTemp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @CountItems @GenProcID @GenProcID_R @DBQueueCurrent @rowcount @Genprocid @PrePropHelper @DBQueueElements_01 @DBQueueElements_02
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
No reverse dependencies extracted.