dbo.QBM_PBufferT_FillTable_CCC

SQL_STORED_PROCEDURE

Created 2025-06-27T17:57:30.367 · modified 2026-04-14T23:14:36.590 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@TableNamevarcharno
@TempTableNamevarcharno

Referenced objects

SchemaObjectColumn/minorClass
DialogTableOBJECT_OR_COLUMN
QBM_PBufferT_FillColumn_CCCOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
dboQBM_FCVStringToIndentOBJECT_OR_COLUMN
dboQBM_FGIColumnExistsOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_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 QBM_PBufferT_FillTable_CCC ( @TableName varchar(30) , @TempTableName varchar(30)  ) as begin declare @CmdColumnSelect nvarchar
2(max) declare @columnname varchar(30) declare @RowCondition nvarchar(max) declare @RowCondition_Table nvarchar(max) declare @ColumnNames QBM_YCursorBuffer
3 declare @ElementCount int declare @ElementIndex int declare @DebugSwitch int = 0 declare @PKName1 varchar(30) , @PKName2 varchar(30) declare @OwnerClause
4 nvarchar(max) SET XACT_ABORT OFF BEGIN TRY select top 1 @PKName1 = isnull(t.PKName1, '') , @PKName2 = isnull(t.PKName2, '') from DialogTable t with (readpast
5) where t.TableName = @TableName select @RowCondition_Table = null select top 1 @RowCondition_Table = t.TransportWhereClause from DialogTable t with (readpast
6) where t.TableName = @TableName and t.TransportWhereClause > ' ' select @RowCondition = '(1=1' + case when dbo.QBM_FGIColumnExists(@TableName, 'XOrigin'
7) = 1 then ' and ( XOrigin > 0)' else '' end + case when @RowCondition_Table > ' ' then ' and (' + @RowCondition_Table + ')' else '' end + ')' if @DebugSwitch
8 > 0 begin print @RowCondition end if @RowCondition = '(1=1)' begin select @RowCondition = '' end  if isnull(@PKName2, '') = '' begin select @OwnerClause
9 = ' o.' + @PKName1 + ' like ''CCC-%'' ' end else  begin select @OwnerClause = concat( '( (o.' , @PKName1 , ' like ''CCC-%''
10	and o.' , @PKName2 , ' like ''[a-z][0-9,a-z][0-9,a-z]-%''
11   )
12	or  
13  (o.'
14 , @PKName2 , ' like ''CCC-%''
15	and o.' , @PKName1 , ' like ''[a-z][0-9,a-z][0-9,a-z]-%''
16  )
17)
18' )  end select @CmdColumnSelect = concat('
19  select distinct c.ColumnName
20	from DialogColumn c join QBM_VSchemaColumns cc on c.columnname = cc.Column_name
21						join DialogTable t with (readpast) on c.UID_DialogTable = t.UID_DialogTable
22															and t.TableName = cc.table_name
23	where t.TableName = '''
24 , @TableName , '''
25	 and c.columnname not in (''XObjectKey''
26								, ''Xtouched''
27								, ''Xdateinserted'', ''Xdateupdated''
28								, ''XUserInserted'', ''XUserUpdated''
29								, ''XMarkedForDeletion''
30--								, ''XOrigin''
31								, ''XIsInEffect''
32	 )
33	and ( c.IsNoTransfer = 0
34		)
35	'
36 , case @TableName when 'QBMNonLinearDepend' then '' else '
37	 and ( exists (select top 1 1 
38						from ' + @TableName + ' o with (readpast)
39						where 
40'
41 + dbo.QBM_FCVStringToIndent( @OwnerClause, 6) + '
42					)
43		 )' end , '
44	order by c.ColumnName' )  if @DebugSwitch > 0 begin print @CmdColumnSelect 
45end insert into @ColumnNames(Ident1 ) exec sp_executesql @CmdColumnSelect select @ElementCount = @@ROWCOUNT if @DebugSwitch > 0 begin select Ident1 from
46 @ColumnNames end select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @columnname = bu.Ident1  from @ColumnNames bu where 
47bu.ElementIndex = @ElementIndex  if @DebugSwitch > 0 begin print char(9) + 'Dumping column ' + @columnname + ' rows: ' + @rowcondition end exec QBM_PBufferT_FillColumn_CCC
48 @TableName , @columnname , @rowcondition = @RowCondition , @TempTableName = @TempTableName select @ElementIndex += 1 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd
49 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: return end 
50

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:14:36.590

has TRY/CATCH error handling

Summary: calls QBM_PBufferT_FillColumn_CCC, QBM_PSessionErrorAdd; writes INSERT into; reads/joins DialogTable, DialogColumn, QBM_VSchemaColumns

Declared parameters

ParameterTypeDirection
@TableNamevarchar(30)input
@TempTableNamevarchar(30)input

DML targets

INSERT into

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @TableName @TempTableName @CmdColumnSelect @columnname @RowCondition @RowCondition_Table @ColumnNames @ElementCount @ElementIndex @DebugSwitch @PKName1 @PKName2 @OwnerClause @ROWCOUNT @rowcondition @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 objectRelationEvidence
dbo.QBM_PBufferT_FillAll_CCCSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PBufferT_FillAll_CCCsource text referencehas TRY/CATCH error handling