dbo.QBM_PViewBuildU_intern
SQL_STORED_PROCEDURE
Created 2025-06-27T17:57:29.917 · modified 2026-04-14T23:20:27.137 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@UID_DialogTableU | varchar | no |
@GenProcID | varchar | no |
@ModuleName | varchar | no |
@AutoCorrectColumns | bit | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogColumn | OBJECT_OR_COLUMN | ||
| DialogTable | OBJECT_OR_COLUMN | ||
| QBM_PDialogColumnDelete | OBJECT_OR_COLUMN | ||
| QBM_PDialogColumnInsert | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_PViewBuild_FromAddOn | OBJECT_OR_COLUMN | ||
| QBM_PViewDrop | OBJECT_OR_COLUMN | ||
| QBMViewAddOn | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGISessionErrorRethrow | OBJECT_OR_COLUMN | |
| dbo | QBM_FGITableName | 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_PViewBuildU_intern ( @UID_DialogTableU varchar(38) , @GenProcID varchar(38) , @ModuleName varchar(3) = '' , @AutoCorrectColumns 2 bit = 0 ) as begin declare @SQLcmd nvarchar(max) declare @TableNameU varchar(38) declare @DebugSwitch int = 0 declare @DebugLevel varchar(1) = 'W' declare 3 @XUser nvarchar(64) = object_name(@@procid) declare @Xdate datetime = getutcdate() SET XACT_ABORT OFF BEGIN TRY select @TableNameU = dbo.QBM_FGITableName 4(@UID_DialogTableU) if exists (select top 1 1 from information_schema.tables where table_name = @TableNameu and table_type = 'VIEW' ) and not exists (select 5 top 1 1 from DialogTable t where t.TableName = @TableNameU ) begin exec QBM_PViewDrop @TableNameU end if not exists (select top 1 1 from DialogTable t 6 where t.TableName = @TableNameU and t.TableType = 'U' ) begin goto endLabel end if not exists (select top 1 1 from DialogTable t where t.UID_DialogTable 7 = @UID_DialogTableU ) begin goto endLabel end if @DebugSwitch > 0 begin select * from QBMViewAddOn where UID_DialogTable = @UID_DialogTableU end exec 8 QBM_PViewBuild_FromAddOn @UID_DialogTableU if @AutoCorrectColumns = 1 begin exec QBM_PDialogColumnDelete @TableNameU , @GenProcID exec QBM_PDialogColumnInsert 9 @TableNameU , @GenProcID, @ModuleName if not exists (select top 1 1 from DialogTable t with (readpast) join DialogColumn c with (readpast) on t.UID_DialogTable 10 = c.UID_DialogTable where t.TableName = @TableNameU and c.IsPKMember = 1 ) begin if @DebugSwitch = 1 begin print 'bisher kein PK gefunden' end Update 11 DialogColumn set IsPKMember = 1 , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogTable t with (readpast) join DialogColumn c with (readpast) 12 on t.UID_DialogTable = c.UID_DialogTable where t.TableName = @TableNameU and c.ColumnName = 'XObjectKey' end end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd 13 default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH endLabel: return 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:20:27.137
has TRY/CATCH error handling
Summary: calls QBM_PViewDrop, QBM_PViewBuild_FromAddOn, QBM_PDialogColumnDelete, QBM_PDialogColumnInsert, QBM_PSessionErrorAdd; writes UPDATE DialogColumn; reads/joins information_schema, DialogTable, QBMViewAddOn, DialogColumn
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@UID_DialogTableU | varchar(38) | input |
@GenProcID | varchar(38) | input |
@ModuleName | varchar(3) | input |
@AutoCorrectColumns | bit | input |
DML targets
UPDATE DialogColumnCalled 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: @UID_DialogTableU @GenProcID @ModuleName @AutoCorrectColumns @SQLcmd @TableNameU @DebugSwitch @DebugLevel @XUser @procid @Xdate @TableNameu @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_PViewBuildU | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_ZViewBuildU | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QBM_PViewBuildU | source text reference | uses session context values, has TRY/CATCH error handling |
| dbo.QBM_ZViewBuildU | source text reference | has TRY/CATCH error handling |