dbo.TSB_ZBaseTreeHasObject

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
BaseTreeOBJECT_OR_COLUMN
BaseTreeHasESetOBJECT_OR_COLUMN
BaseTreeHasObjectOBJECT_OR_COLUMN
BaseTreeHasTSBAccountDefOBJECT_OR_COLUMN
BaseTreeHasUNSGroupBOBJECT_OR_COLUMN
BaseTreeHasUNSGroupB1OBJECT_OR_COLUMN
BaseTreeHasUNSGroupB2OBJECT_OR_COLUMN
BaseTreeHasUNSGroupB3OBJECT_OR_COLUMN
ESetHasEntitlementOBJECT_OR_COLUMN
OrgRootAssignOBJECT_OR_COLUMN
QBM_PDBQueueCalculateDeltaOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YDataForDeltaTYPE
QBM_YDBQueueCurrentTYPE
QBMDBQueueCurrentOBJECT_OR_COLUMN
QER_PBasetreeHasObjectPostProcOBJECT_OR_COLUMN
TSBAccountDefOBJECT_OR_COLUMN
UNSGroupBOBJECT_OR_COLUMN
UNSGroupB1OBJECT_OR_COLUMN
UNSGroupB1CollectionOBJECT_OR_COLUMN
UNSGroupB2OBJECT_OR_COLUMN
UNSGroupB2CollectionOBJECT_OR_COLUMN
UNSGroupB3OBJECT_OR_COLUMN
UNSGroupB3CollectionOBJECT_OR_COLUMN
UNSGroupBCollectionOBJECT_OR_COLUMN
dboQBM_FGIBitPatternXOriginOBJECT_OR_COLUMN
dboQBM_FGIModuleExistsOBJECT_OR_COLUMN
dboQER_FCVXOriginToInheritInfoOBJECT_OR_COLUMN
dboQER_FGIBitPatternInheritInfoOBJECT_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 TSB_ZBaseTreeHasObject (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin
2 int declare @QER_BitPattern_Inherit_0 int = dbo.QER_FGIBitPatternInheritInfo('|Inherit|', 0) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXOrigin_Inherit
3 int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 0)  BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID
4) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount
5 = 0 begin goto EndLabel end insert into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , uid_Org
6, ObjectKey, InheritInfo from BaseTreeHasObject bho join @DBQueueCurrent x on uid_Org = x.uid_parameter where bho.ObjectKey like '<Key><T>UNSGroupB</T>%'
7 or bho.ObjectKey like '<Key><T>UNSGroupB1</T>%' or bho.ObjectKey like '<Key><T>UNSGroupB2</T>%' or bho.ObjectKey like '<Key><T>UNSGroupB3</T>%' or bho.ObjectKey
8 like '<Key><T>TSBAccountDef</T>%'  insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 ,
9 y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasUNSGroupB y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and
10 y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB z on z.uid_UNSGroupB = y.uid_UNSGroupB union all select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo
11(y.XOrigin) from BaseTreeHasUNSGroupB1 y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB1 z
12 on z.uid_UNSGroupB1 = y.uid_UNSGroupB1 union all select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasUNSGroupB2
13 y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB2 z on z.uid_UNSGroupB2 = y.uid_UNSGroupB2
14 union all select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasUNSGroupB3 y join @DBQueueCurrent x on y.UID_Org=
15 x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB3 z on z.uid_UNSGroupB3 = y.uid_UNSGroupB3 insert into @SourceData( IsUpcommingContent
16, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasTSBAccountDef
17 y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join TSBAccountDef z on z.UID_TSBAccountDef = y.UID_TSBAccountDef
18 if dbo.QBM_FGIModuleExists('RMS') = 1 begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select
19 1, 0 , y.UID_Org, ehe.Entitlement, dbo.QER_FCVXOriginToInheritInfo(@QBM_BitPatternXOrigin_Inherit) from BaseTreeHasESet y join @DBQueueCurrent x on y.UID_Org
20 = x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join ESetHasEntitlement ehe on ehe.UID_ESet = y.UID_ESet and ehe.XOrigin > 0 and ehe.XIsInEffect
21 = 1 join BaseTree b on y.UID_Org = b.UID_Org  and not (b.UID_OrgRoot in ( 'QER-V-ITShopOrg', 'QER-V-ITShopSrc') and b.ITShopInfo in ( 'BO', 'PR', 'BG'
22, 'BT') ) join OrgRootAssign oa on oa.UID_OrgRoot = b.UID_OrgRoot and oa.IsAssignmentAllowed = 1 where ((ehe.Entitlement like '<Key><T>UNSGroupB</T>%' 
23and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB') or (ehe.Entitlement like '<Key><T>UNSGroupB1</T>%' and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB1'
24) or (ehe.Entitlement like '<Key><T>UNSGroupB2</T>%' and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB2') or (ehe.Entitlement like '<Key><T>UNSGroupB3</T>%'
25 and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB3') or (ehe.Entitlement like '<Key><T>TSBAccountDef</T>%' and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-TSBAccountDef'
26) )        end   insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , t.Element, t.XObjectKey
27, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB g on ho.AssignedElement = g.XObjectKey  
28join UNSGroupBCollection co on co.UID_UNSGroupBChild = g.uid_UNSGroupB join UNSGroupB p on co.UID_UNSGroupBParent = p.UID_UNSGroupB where ho.IsUpcommingContent
29 = 1 and co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent  ) as t         union all select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from
30 ( select distinct ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB1 g on ho.AssignedElement = g.XObjectKey join UNSGroupB1Collection co on 
31co.UID_UNSGroupB1Child = g.uid_UNSGroupB1 join UNSGroupB1 p on co.UID_UNSGroupB1Parent = p.UID_UNSGroupB1 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB1Child
32 <> co.UID_UNSGroupB1Parent ) as t union all select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey
33 from @SourceData ho join UNSGroupB2 g on ho.AssignedElement = g.XObjectKey join UNSGroupB2Collection co on co.UID_UNSGroupB2Child = g.uid_UNSGroupB2 join
34 UNSGroupB2 p on co.UID_UNSGroupB2Parent = p.UID_UNSGroupB2 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB2Child <> co.UID_UNSGroupB2Parent ) as 
35t union all select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB3
36 g on ho.AssignedElement = g.XObjectKey join UNSGroupB3Collection co on co.UID_UNSGroupB3Child = g.uid_UNSGroupB3 join UNSGroupB3 p on co.UID_UNSGroupB3Parent
37 = p.UID_UNSGroupB3 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB3Child <> co.UID_UNSGroupB3Parent ) as t berechnen: exec QBM_PDBQueueCalculateDelta
38 @SourceData, @DeltaQuantity = 0, @DeltaDelete = 1, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin
39 = @CountDeltaOrigin output , @UseIsInEffect = 0 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent exec QER_PBasetreeHasObjectPostProc
40 @CountDeltaOrigin, @CountDeltaQantity END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end 
41

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

has TRY/CATCH error handling

Summary: calls QBM_PDBQueueCalculateDelta, QER_PBasetreeHasObjectPostProc, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, BaseTreeHasObject, BaseTreeHasUNSGroupB, UNSGroupB, BaseTreeHasUNSGroupB1…

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.