dbo.QBM_PViewDrop

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@patternnvarcharno
@forcebitno

Referenced objects

SchemaObjectColumn/minorClass
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBMModuleDefOBJECT_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_PViewDrop (@pattern nvarchar(255) , @force bit = 0 )  as begin  declare @SQLcmd nvarchar(max) declare @name nvarchar(255
2)  declare @LengthMessage nvarchar(256) = '#LDS#Name of Element {0} is too long (30).|' declare @ElementBuffer QBM_YCursorBuffer    declare @ElementCount
3 int declare @ElementIndex int declare @crlf nvarchar(16) = nchar(13) + nchar(10) declare @CommentCode bit = 0 declare @DebugSwitch int = 0 SET XACT_ABORT
4 OFF BEGIN TRY if @@NESTLEVEL < 2  begin if exists (select top 1 1 from sys.tables t where t.name = 'QBMModuleDef' ) begin if exists (select top 1 1 from
5 QBMModuleDef d where d.UID_ModuleDef = 'MDK-Moduledefinition' ) and exists (select top 1 1 from information_schema.routines r where r.ROUTINE_type = N'function'
6 and r.ROUTINE_NAME = 'QBM_FSQObjectComment' ) begin select @CommentCode = 1 end end end insert into @ElementBuffer(LongIdent1, ContentFull) select v.name
7 , concat( case @CommentCode when 1 then concat('print dbo.QBM_FSQObjectComment (''' , v.name , ''')' , @crlf ) else '' end , 'drop view if exists "' ,
8 v.name , N'"' )  from sys.views v where v.name like @pattern select @ElementCount = @@ROWCOUNT if exists (select top 1 1 from @ElementBuffer e where len
9(e.LongIdent1) > 30 and @force = 0 ) begin select top 1 @name = e.LongIdent1 from @ElementBuffer e where len(e.LongIdent1) > 30 select @LengthMessage =
10 concat(@LengthMessage , @name , '|') raiserror(@LengthMessage, 18, 1) with nowait end select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin
11 select top 1 @SQLcmd = bu.ContentFull from @ElementBuffer bu where bu.ElementIndex = @ElementIndex if @DebugSwitch > 0 begin print @sqlcmd end exec sp_executeSQL
12 @SQLcmd select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow
13() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH end 
14

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.037

has TRY/CATCH error handling

Summary: calls QBM_PSessionErrorAdd; writes INSERT into; reads/joins sys, QBMModuleDef, information_schema

Declared parameters

ParameterTypeDirection
@patternnvarchar(255)input
@forcebitinput

DML targets

INSERT into

Called routines

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #LDS #Name

Variables: @pattern @force @SQLcmd @name @LengthMessage @ElementBuffer @ElementCount @ElementIndex @crlf @CommentCode @DebugSwitch @NESTLEVEL @ROWCOUNT @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.QBM_PDashBoardDefineSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PModuleRemoveSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PSQLCreateSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PTableReloadSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuild_FromAddOnSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildP_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildPrepareVPURSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildR_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildU_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PViewBuildV_internSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_PDashBoardDefinesource text referencehas TRY/CATCH error handling
dbo.QBM_PModuleRemovesource text referencehas TRY/CATCH error handling
dbo.QBM_PSQLCreatesource text referencehas TRY/CATCH error handling
dbo.QBM_PTableReloadsource text referenceinserts DBQueue tasks, has TRY/CATCH error handling
dbo.QBM_PViewBuild_FromAddOnsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildP_internsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildPrepareVPURsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildR_internsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildU_internsource text referencehas TRY/CATCH error handling
dbo.QBM_PViewBuildV_internsource text referencehas TRY/CATCH error handling