dbo.QBM_PIndexCreateGenerated_XX
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:28.963 · modified 2026-04-14T23:20:25.627 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@TableName | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogColumn | OBJECT_OR_COLUMN | ||
| DialogTable | OBJECT_OR_COLUMN | ||
| QBM_PIndexCreate | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_VHeavyLoadTables | OBJECT_OR_COLUMN | ||
| QBM_VQBMRelation | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| dbo | QBM_FGICodeName | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | 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_PIndexCreateGenerated_XX (@TableName varchar(30) ) as begin declare @ColumnName varchar(30) declare @HasXIsInEffect bit 2 declare @HasXOrigin bit declare @HasInheritInfo bit declare @Indexname varchar(30) declare @IncludeList nvarchar(max) declare @DebugSwitch int = 0 declare 3 @ElementBufferMulti QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int SET XACT_ABORT OFF BEGIN TRY insert into @ElementBufferMulti 4 (Ident2, Bit1, Int1, Int2) select distinct x.ColumnName, x.HasXIsInEffect, x.HasXOrigin, x.HasInheritInfo from ( select tc.TableName, c.ColumnName , sign 5(len(isnull(ce.UID_DialogColumn, ''))) as HasXIsInEffect , sign(len(isnull(co.UID_DialogColumn, ''))) as HasXOrigin , sign(len(isnull(ci.UID_DialogColumn 6, ''))) as HasInheritInfo from QBM_VQBMRelation r join DialogColumn c with (readpast) on r.UID_ChildColumn = c.UID_DialogColumn join DialogTable tc with 7 (readpast) on c.UID_DialogTable = tc.UID_DialogTable and tc.TableType in ('B', 'T') left outer join DialogColumn co with (readpast) on co.UID_DialogTable 8 = tc.UID_DialogTable and co.ColumnName = 'XOrigin' left outer join DialogColumn ce with (readpast) on tc.UID_DialogTable = ce.UID_DialogTable and ce.ColumnName 9 = 'XIsInEffect' left outer join DialogColumn ci with (readpast) on tc.UID_DialogTable = ci.UID_DialogTable and ci.ColumnName = 'InheritInfo' where r.IsMNRelation 10 = 1 and tc.TableName = @TableName union all select tc.TableName, c.ColumnName , 0 as HasXIsInEffect , 0 as HasXOrigin , sign(len(isnull(ci.UID_DialogColumn 11, ''))) as HasInheritInfo from QBM_VQBMRelation r join DialogColumn c with (readpast) on r.UID_ChildColumn = c.UID_DialogColumn join DialogTable tc with 12 (readpast) on c.UID_DialogTable = tc.UID_DialogTable and tc.TableType in ('B', 'T') left outer join DialogColumn co with (readpast) on co.UID_DialogTable 13 = tc.UID_DialogTable and co.ColumnName = 'XOrigin' left outer join DialogColumn ce with (readpast) on tc.UID_DialogTable = ce.UID_DialogTable and ce.ColumnName 14 = 'XIsInEffect' left outer join DialogColumn ci with (readpast) on tc.UID_DialogTable = ci.UID_DialogTable and ci.ColumnName = 'InheritInfo' where r.IsMNRelation 15 = 0 and tc.TableName = @TableName union all select tc.TableName, c.ColumnName , sign(len(isnull(ce.UID_DialogColumn, ''))) as HasXIsInEffect , sign(len 16(isnull(co.UID_DialogColumn, ''))) as HasXOrigin , sign(len(isnull(ci.UID_DialogColumn, ''))) as HasInheritInfo from DialogTable tc with (readpast) join 17 QBM_VQBMRelation r on r.UID_DialogTableChild = tc.UID_DialogTable and tc.TableType in ('B', 'T') join DialogColumn c with (readpast) on c.UID_DialogColumn 18 = r.UID_ChildColumn left outer join DialogColumn co with (readpast) on co.UID_DialogTable = tc.UID_DialogTable and co.ColumnName = 'XOrigin' left outer 19 join DialogColumn ce with (readpast) on tc.UID_DialogTable = ce.UID_DialogTable and ce.ColumnName = 'XIsInEffect' left outer join DialogColumn ci with 20 (readpast) on tc.UID_DialogTable = ci.UID_DialogTable and ci.ColumnName = 'InheritInfo' where tc.IsMAllTable = 1 and tc.TableName = @TableName ) as x 21 join sys.tables ts with (nolock) on x.TableName = ts.name collate database_default and ts.type = 'U' join sys.schemas s with (nolock) on ts.schema_id 22 = s.schema_id and s.name = 'dbo' join sys.columns cs with (nolock) on ts.object_id = cs.object_id and cs.name = x.ColumnName collate database_default 23where not exists (Select top 1 1 from QBM_VHeavyLoadTables h where h.TableName = x.TableName and h.IsNoAutoIndex = 1 ) order by 1,2 select @ElementCount 24 = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @columnname = bu.Ident2 , @HasXIsInEffect = bu.Bit1 , @HasXOrigin 25 = bu.Int1 , @HasInheritInfo = bu.Int2 from @ElementBufferMulti bu where bu.ElementIndex = @ElementIndex select @Indexname = dbo.QBM_FGICodeName('XX', 26@TableName + @ColumnName ) if @DebugSwitch > 0 begin print @Indexname end select @IncludeList = '' if @HasXOrigin = 1 begin select @IncludeList = 'Xorigin' 27 end if @HasXIsInEffect = 1 begin select @IncludeList = @IncludeList + ', XIsInEffect' end if @HasInheritInfo = 1 begin select @IncludeList = 'InheritInfo' 28 end if @DebugSwitch > 0 begin print concat(@ColumnName, '(', @IncludeList, ')' ) end exec QBM_PIndexCreate @TableName, @Indexname, 0, @ColumnName, @IncludeList 29 select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() 30RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return end 31
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:25.627
has TRY/CATCH error handling
Summary: calls QBM_PIndexCreate, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBM_VQBMRelation, DialogColumn, DialogTable, sys, QBM_VHeavyLoadTables
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@TableName | varchar(30) | 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: @TableName @ColumnName @HasXIsInEffect @HasXOrigin @HasInheritInfo @Indexname @IncludeList @DebugSwitch @ElementBufferMulti @ElementCount @ElementIndex @ROWCOUNT @columnname @Rethrow
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.
| Referencing object | Relation | Evidence |
|---|---|---|
| dbo.QBM_PIndexCreateGenerated | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PIndexCreateGenerated | source text reference | has TRY/CATCH error handling |