dbo.QER_ZBaseTreeCollectionF

SQL_STORED_PROCEDURE

Created 2025-06-27T18:01:06.983 · modified 2026-04-14T23:20:39.610 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
BaseTreeOBJECT_OR_COLUMN
BaseTreeCollectionFOBJECT_OR_COLUMN
QBM_PDBQueueCalculateDeltaOBJECT_OR_COLUMN
QBM_PSessionContextSetOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBM_YDataForDeltaTYPE
QBM_YDBQueueCurrentTYPE
QBM_YDBQueueDeltaHelperTYPE
QBMDBQueueCurrentOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1     create   procedure QER_ZBaseTreeCollectionF (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin
2 int declare @lauf int declare @ElementCount int declare @ElementIndex int declare @ElementLast int declare @GenProcID varchar(38) declare @GenProcID_R
3 varchar(38) = dbo.QBM_FGISessionContext('') declare @QBMDeltaHelper QBM_YDBQueueDeltaHelper declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert
4 into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID
5 from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end insert into @SourceData( IsUpcommingContent
6, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , co.UID_Org, co.UID_ParentOrg, 1 from BaseTreeCollectionF co join @DBQueueCurrent
7 x on co.UID_Org = x.uid_parameter  insert into @QBMDeltaHelper (Element, AssignedElement) select p.UID_Parameter, p.UID_Parameter from @DBQueueCurrent
8 p  select @lauf = 1 while @lauf > 0 begin insert into @QBMDeltaHelper (Element, AssignedElement) select distinct a.Element, b.UID_ParentOrg from @QBMDeltaHelper
9 a join BaseTree b on a.AssignedElement = b.UID_Org where b.UID_ParentOrg > ' ' and not exists (select top 1 1 from @QBMDeltaHelper h where h.Element =
10 a.Element and h.AssignedElement = b.UID_ParentOrg ) select @lauf = @@rowcount end insert into @SourceData( IsUpcommingContent, XOriginAfter , Element,
11 AssignedElement, XOriginBefore ) select 1, 1 , Element, AssignedElement, 0 from @QBMDeltaHelper exec QBM_PDBQueueCalculateDelta @SourceData, @DeltaQuantity
12 = 0, @DeltaDelete = 1, @DeltaInsert = 1, @DeltaOrigin = 0, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin output
13 , @UseIsInEffect = 0 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent if @CountDeltaQantity > 0 begin declare @GenProcIDs_CountDeltaQuantity
14 QBM_YCursorBuffer insert into @GenProcIDs_CountDeltaQuantity (UID1) select de.GenProcID from #QBMDeltaDelete de union select de.GenProcID from #QBMDeltaInsert
15 de select @ElementCount = @@ROWCOUNT select @ElementIndex = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast
16 begin select top 1 @GenProcID = bu.UID1 from @GenProcIDs_CountDeltaQuantity bu where bu.ElementIndex = @ElementIndex if exists (select top 1 1 from #QBMDeltaDelete
17 x where x.GenProcID = @GenProcID ) begin exec QBM_PSessionContextSet 'GenProcID', @GenProcID delete BaseTreeCollectionF from BaseTreeCollectionF co where
18 exists (select top 1 1 from #QBMDeltaDelete d where d.AssignedElement = co.UID_ParentOrg and d.Element = co.UID_Org and d.GenProcID = @GenProcID ) end
19  if exists (select top 1 1 from #QBMDeltaInsert x where x.GenProcID = @GenProcID ) begin exec QBM_PSessionContextSet 'GenProcID', @GenProcID insert into
20 BaseTreeCollectionF ( UID_Org, UID_ParentOrg) select x.uid_org, x.uid_parentOrg from ( select Element as uid_Org, AssignedElement as uid_ParentOrg from
21 #QBMDeltaInsert where GenProcID = @GenProcID ) as x end  select @ElementIndex += 1 end  end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR
22 ('', 18, 1) WITH NOWAIT END CATCH  endLabel: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R return end 
23

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:39.610

uses session context values has TRY/CATCH error handling

Summary: calls QBM_PDBQueueCalculateDelta, QBM_PSessionContextSet, QBM_PSessionErrorAdd; writes INSERT into, INSERT BaseTreeCollectionF, DELETE BaseTreeCollectionF; reads/joins QBMDBQueueCurrent, BaseTreeCollectionF, BaseTree; uses session context GenProcID

Declared parameters

ParameterTypeDirection
@SlotNumberintinput

DML targets

INSERT into INSERT BaseTreeCollectionF DELETE BaseTreeCollectionF

Config/session

Config: None extracted.

Session: GenProcID

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #QBMDeltaDelete #QBMDeltaInsert

Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @lauf @ElementCount @ElementIndex @ElementLast @GenProcID @GenProcID_R @QBMDeltaHelper @DBQueueCurrent @rowcount @SourceData @DeltaQuantity @DeltaDelete @DeltaInsert @DeltaOrigin @UseIsInEffect @DBQueueCurrentExtern @GenProcIDs_CountDeltaQuantity @ROWCOUNT @IDENTITY

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.