dbo.QBM_PGICountTablesUsedByCode

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@StatementsQBM_YCursorBufferno
@CodeNamevarcharno
@CodeTypevarcharno
@OpenParenthesisnvarcharno
@CloseParenthesisnvarcharno

Referenced objects

SchemaObjectColumn/minorClass
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorbufferTYPE
dboQBM_FGICountTablesUsedByCodeOBJECT_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_PGICountTablesUsedByCode( @Statements QBM_YCursorbuffer readonly  , @CodeName varchar(30)  , @CodeType varchar(30)  , 
2@OpenParenthesis nvarchar(max)   , @CloseParenthesis nvarchar(max)  )  as begin declare @SQLCmd nvarchar(max) declare @ElementCount int declare @ElementIndex
3 int declare @CountRefereced int = 0  declare @DebugSwitch int = 0 SET XACT_ABORT OFF BEGIN TRY set nocount on select @ElementCount = count(*) from @Statements
4 select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select @SQLCmd = concat( 'drop ', @CodeType, ' if exists dbo.', @CodeName) exec sp_executesql
5 @SQLCmd select @SQLCmd = concat ( @OpenParenthesis, s.ContentFull , @CloseParenthesis ) from @Statements s where s.ElementIndex = @ElementIndex if @DebugSwitch
6 > 0 begin print @sqlcmd end exec sp_executesql @SQLCmd select @CountRefereced += dbo.QBM_FGICountTablesUsedByCode(@CodeName) if @DebugSwitch > 0 begin
7 print '@CountRefereced ' + str(@CountRefereced) end select @SQLCmd = concat( 'drop ', @CodeType, ' if exists dbo.', @CodeName) exec sp_executesql @SQLCmd
8 select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() 
9RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel:  return(@CountRefereced) end 
10

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

has TRY/CATCH error handling

Summary: calls QBM_PSessionErrorAdd

Declared parameters

ParameterTypeDirection
@Statementsqbm_ycursorbufferinput
@CodeNamevarchar(30)input
@CodeTypevarchar(30)input
@OpenParenthesisnvarcharinput
@CloseParenthesisnvarcharinput

DML targets

None extracted.

Called routines

Read/join references

None extracted.

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @Statements @CodeName @CodeType @OpenParenthesis @CloseParenthesis @SQLCmd @ElementCount @ElementIndex @CountRefereced @DebugSwitch @sqlcmd @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.ATT_ZAttHelperFillMakeProcSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_P30907EB9FB8232867B_funcSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_ZPWOHelperFillMakeProcSQL expression dependencyOBJECT_OR_COLUMN
dbo.ATT_ZAttHelperFillMakeProcsource text referencehas TRY/CATCH error handling
dbo.QER_P30907EB9FB8232867B_funcsource text referenceSQL_STORED_PROCEDURE
dbo.QER_ZPWOHelperFillMakeProcsource text referencehas TRY/CATCH error handling