dbo.TSB_ZUNSGroupBHasUNSItemB
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:20.737 · modified 2026-04-14T23:20:46.447 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DPRNameSpace | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueCalculateDelta | OBJECT_OR_COLUMN | ||
| QBM_PMNTableInsert | OBJECT_OR_COLUMN | ||
| QBM_PMNTableOriginUpdate | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDataForDelta | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| UNSGroupB | OBJECT_OR_COLUMN | ||
| UNSGroupBHasUNSItemB | OBJECT_OR_COLUMN | ||
| UNSGroupBInUNSGroupB | OBJECT_OR_COLUMN | ||
| UNSItemB | OBJECT_OR_COLUMN | ||
| UNSRootB | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIBitPatternXOrigin | 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 TSB_ZUNSGroupBHasUNSItemB (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin 2 int declare @GenProcID varchar(38) declare @UID_UNSRootB varchar(38) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXOrigin_Inherit 3 int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 0) declare @QBM_BitPatternXOrigin_Inherit_inv int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 1) BEGIN 4 TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter 5, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end insert into @SourceData 6( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore , XIsInEffectBefore, XIsInEffectAfter ) select 0, 0 , aig.UID_UNSGroupB, aig.UID_UNSItemB 7, aig.XOrigin , aig.XIsInEffect, 0 from UNSGroupBHasUNSItemB aig join @DBQueueCurrent x on UID_UNSGroupB = x.UID_parameter insert into @SourceData( IsUpcommingContent 8, XOriginBefore, XOriginAfter , Element, AssignedElement , XIsInEffectBefore, XIsInEffectAfter ) select 1, 0, aig.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv 9 , aig.UID_UNSGroupB, aig.UID_UNSItemB , aig.XIsInEffect, case when n.UID_UNSRootB = g.UID_UNSRootB then 1 when ns.IsExtendedInheritance = 0 then 0 when 10 ns.IsExtendedInheritance = 1 and ns.UID_DPRNameSpace = rg.UID_DPRNameSpace then 1 else 0 end from UNSGroupBHasUNSItemB aig join @DBQueueCurrent x on aig.UID_UNSGroupB 11 = x.UID_parameter join UNSGroupB n on aig.UID_UNSGroupB = n.UID_UNSGroupB join UNSItemB g on aig.UID_UNSItemB = g.UID_UNSItemB join UNSRootB rn on n.UID_UNSRootB 12 = rn.UID_UNSRootB join DPRNameSpace ns on rn.UID_DPRNameSpace = ns.UID_DPRNameSpace join UNSRootB rg on g.UID_UNSRootB = rg.UID_UNSRootB insert into @SourceData 13( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter , XIsInEffectBefore, XIsInEffectAfter ) select 1, 0 , gig.uid_UNSGroupBChild 14, t.uid_UnsItemB, @QBM_BitPatternXOrigin_Inherit , 0, 1 from UNSGroupBInUNSGroupB gig join @DBQueueCurrent x on gig.UID_UNSGroupBChild = x.UID_parameter 15 and gig.UID_UNSGroupBChild <> gig.UID_UNSGroupBParent join UNSGroupBHasUNSItemB t on t.uid_UNsGroupB = gig.uid_UNSGroupBParent and XIsInEffect = 1 join 16 UNSGroupB n on t.UID_UNSGroupB = n.UID_UNSGroupB join UNSItemB g on t.UID_UNSItemB = g.UID_UNSItemB join UNSRootB rn on n.UID_UNSRootB = rn.UID_UNSRootB 17 join DPRNameSpace ns on rn.UID_DPRNameSpace = ns.UID_DPRNameSpace join UNSRootB rg on g.UID_UNSRootB = rg.UID_UNSRootB where 1 = case when n.UID_UNSRootB 18 = g.UID_UNSRootB then 1 when ns.IsExtendedInheritance = 0 then 0 when ns.IsExtendedInheritance = 1 and ns.UID_DPRNameSpace = rg.UID_DPRNameSpace then 19 1 else 0 end exec QBM_PDBQueueCalculateDelta @SourceData, @DeltaQuantity = 0, @DeltaDelete = 0, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity 20 = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin output , @UseIsInEffect = 1 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = 21@DBQueueCurrent if @CountDeltaOrigin > 0 begin exec QBM_PMNTableOriginUpdate 'UNSGroupBHasUNSItemB', 'UID_UNSGroupB', 'UID_UNSItemB' end if @CountDeltaQantity 22 > 0 begin exec QBM_PMNTableInsert 'UNSGroupBHasUNSItemB', 'UID_UNSGroupB', 'UID_UNSItemB', @TargetIsView = 0 , @FKTableNameElement = 'UNSGroupB' , @FKColumnNameElement 23 = 'UID_UNSGroupB' end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end 24
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.447
has TRY/CATCH error handling
Summary: calls QBM_PDBQueueCalculateDelta, QBM_PMNTableOriginUpdate, QBM_PMNTableInsert, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, UNSGroupBHasUNSItemB, UNSGroupB, UNSItemB, UNSRootB…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT intoCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @GenProcID @UID_UNSRootB @DBQueueCurrent @QBM_BitPatternXOrigin_Inherit @QBM_BitPatternXOrigin_Inherit_inv @rowcount @SourceData @DeltaQuantity @DeltaDelete @DeltaInsert @DeltaOrigin @UseIsInEffect @DBQueueCurrentExtern @TargetIsView @FKTableNameElement @FKColumnNameElement
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.