dbo.QBM_TUDialogTable

SQL_TRIGGER parent DialogTable

Created 2025-06-27T18:01:00.957 · modified 2026-04-14T23:23:08.170 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
No parameters.

Referenced objects

SchemaObjectColumn/minorClass
deletedOBJECT_OR_COLUMN
DialogTableOBJECT_OR_COLUMN
insertedOBJECT_OR_COLUMN
QBM_PDBQueueInsert_BulkOBJECT_OR_COLUMN
QBM_PGUIDReplaceCustomizerFillOBJECT_OR_COLUMN
QBM_PPrePropCheckSyntaxOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_PSQLCheckExecutableOBJECT_OR_COLUMN
QBM_VQBMRelationOBJECT_OR_COLUMN
QBM_VQBMRelationALLOBJECT_OR_COLUMN
QBM_VStartupTablesOBJECT_OR_COLUMN
QBM_YDBQueueRawTYPE
QBM_YParameterListTYPE
dboQBM_FGISessionContextOBJECT_OR_COLUMN
dboQBM_FGITableNameOBJECT_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   trigger QBM_TUDialogTable on DialogTable  for Update not for Replication as begin declare @msg nvarchar(1000) declare @SQLToCheck QBM_YParameterList
2 declare @ConditionsToCheck QBM_YParameterList BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto
3 start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update(UID_QBMDiskStoreLogical) begin if exists
4 (select top 1 1 from deleted d join DialogTable t on d.UID_DialogTable = t.UID_DialogTable where t.TableName in (select TableName from QBM_VStartupTables
5 union select 'QBMDiskStoreLogical' union select 'QBMDiskStorePhysical' ) and d.UID_QBMDiskStoreLogical is null and t.UID_QBMDiskStoreLogical > ' ' ) begin
6  select @msg = '#LDS#Cannot move the selected Table(s) to other filegroup.|' raiserror (@msg, 18, 1) with nowait end end if update(UID_DialogTable) or
7 update(TableName) begin if exists (select top 1 1 from inserted i where i.UID_DialogTable not like '___-T-' + i.TableName ) begin raiserror ('#LDS#TableName and UID_DialogTable mismatch|'
8, 18, 1) with nowait end end  if update(ViewWhereClause) begin delete  @SQLToCheck  insert into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey
9, 'select top 1 1 as columnvalue from ' + b.TableName + '
10		 where (
11		 ' + c.ViewWhereClause + '
12		 )' from inserted c  join DialogTable b on b.UID_DialogTable
13 = c.UID_DialogTableBase where c.ViewWhereClause > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 end  if update(ExtensionForProxyTable)
14 begin delete  @SQLToCheck insert into @SQLToCheck(Parameter1, ContentFull) select i.XObjectKey, concat('select top 1 1 as columnvalue 
15									from ('
16 , ' select ', i.ExtensionForProxyTable, '
17											from ' , i.tablename , '
18											where 1 = 0
19										) as x' ) from inserted i  where i.ExtensionForProxyTable
20 > ' ' exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 end if update(preprocessorcondition) begin  insert into @ConditionsToCheck (ContentFull
21) select i.PreProcessorCondition from inserted i exec QBM_PPrePropCheckSyntax @ConditionsToCheck  declare @DBQueueElements_01 QBM_YDBQueueRaw insert into
22 @DBQueueElements_01 (object, subobject, genprocid) select dbo.QBM_FGITableName(x.uid), null, @GenProcID from (select i.UID_DialogTable as UID from DialogTable
23 i join deleted d on i.UID_DialogTable = d.UID_DialogTable and isnull(i.preprocessorcondition,N'') <> isnull(d.preprocessorcondition,N'') ) as x exec QBM_PDBQueueInsert_Bulk
24 'QBM-K-CommonPrepropTable', @DBQueueElements_01 end if update(IsModuleGUIDAllowed) begin exec QBM_PGUIDReplaceCustomizerFill end  if update(IsMAllTable
25) or update(IsMNTable) begin declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null
26, @GenProcID from (select i.Tablename as UID from DialogTable i join deleted d on i.UID_DialogTable = d.UID_DialogTable where isnull(i.IsMAllTable, 0) 
27<> isnull(d.IsMAllTable, 0) or isnull(i.IsMNTable, 0) <> isnull(d.IsMNTable, 0) ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger', @DBQueueElements_02
28 end     if update (IsDeactivatedByPreProcessor) or update (DisplayPattern) or update(DisplayPatternLong) begin declare @DBQueueElements_36836 QBM_YDBQueueRaw
29 insert into @DBQueueElements_36836(Object, SubObject, GenProcID) select x.uid, null, @GenProcID from ( select ra.UID_DialogTableParent as uid from deleted
30 d join DialogTable t on d.UID_DialogTable = t.UID_DialogTable join QBM_VQBMRelationALL ra on t.UID_DialogTable = ra.UID_DialogTableChild where isnull(d.IsDeactivatedByPreProcessor
31, 0) <> isnull(t.IsDeactivatedByPreProcessor, 0) or isnull(d.DisplayPattern, '') <> isnull(t.DisplayPattern, '') or isnull(d.DisplayPatternLong, '') <>
32 isnull(t.DisplayPatternLong, '') union select ra.UID_DialogTableChild from deleted d join DialogTable t on d.UID_DialogTable = t.UID_DialogTable join 
33QBM_VQBMRelationALL ra on t.UID_DialogTable = ra.UID_DialogTableParent where isnull(d.IsDeactivatedByPreProcessor, 0) <> isnull(t.IsDeactivatedByPreProcessor
34, 0) or isnull(d.DisplayPattern, '') <> isnull(t.DisplayPattern, '') or isnull(d.DisplayPatternLong, '') <> isnull(t.DisplayPatternLong, '') union select
35 t.UID_DialogTable from deleted d join DialogTable t on d.UID_DialogTable = t.UID_DialogTable where isnull(d.IsDeactivatedByPreProcessor, 0) <> isnull(t.IsDeactivatedByPreProcessor
36, 0) or isnull(d.DisplayPattern, '') <> isnull(t.DisplayPattern, '') or isnull(d.DisplayPatternLong, '') <> isnull(t.DisplayPatternLong, '') ) as x exec
37 QBM_PDBQueueInsert_Bulk 'QBM-K-MissingDisplayRightFill', @DBQueueElements_36836 end  if update (DisplayPattern) or update(DisplayPatternLong) begin declare
38 @DBQueueElements_478791 QBM_YDBQueueRaw insert into @DBQueueElements_478791(Object, SubObject, GenProcID) select x.uid, null, @GenProcID from ( select
39 d.TableName as uid from deleted d join DialogTable t on d.UID_DialogTable = t.UID_DialogTable where isnull(d.DisplayPattern, '') <> isnull(t.DisplayPattern
40, '') or isnull(d.DisplayPatternLong, '') <> isnull(t.DisplayPatternLong, '') union select r.ChildTable from QBM_VQBMRelation r join deleted d on r.ParentTable
41 = d.TableName join DialogTable t on d.UID_DialogTable = t.UID_DialogTable where isnull(d.DisplayPattern, '') <> isnull(t.DisplayPattern, '') or isnull
42(d.DisplayPatternLong, '') <> isnull(t.DisplayPatternLong, '') union select r2.ChildTable from QBM_VQBMRelation r1 join QBM_VQBMRelation r2 on r1.ChildTable
43 = r2.ParentTable join deleted d on r1.ParentTable = d.TableName join DialogTable t on d.UID_DialogTable = t.UID_DialogTable where isnull(d.DisplayPattern
44, '') <> isnull(t.DisplayPattern, '') or isnull(d.DisplayPatternLong, '') <> isnull(t.DisplayPatternLong, '') ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonMakeWatchtrigger'
45, @DBQueueElements_478791 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH end 
46

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:23:08.170

inserts DBQueue tasks uses session context values has TRY/CATCH error handling

Summary: calls QBM_PSQLCheckExecutable, QBM_PPrePropCheckSyntax, QBM_PDBQueueInsert_Bulk, QBM_PGUIDReplaceCustomizerFill, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, DialogTable, QBM_VStartupTables, QBM_VQBMRelationALL…

Declared parameters

No declared parameters in sys.parameters for this object, or metadata was not available.

DML targets

INSERT into UPDATE not

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

QBM-K-CommonPrepropTable QBM-K-CommonMakeWatchtrigger QBM-K-MissingDisplayRightFill

Temp tables / referenced variables

Temp: #LDS #Cannot #TableName

Variables: @msg @SQLToCheck @ConditionsToCheck @GenProcID @RaiseError @DBQueueElements_01 @DBQueueElements_02 @DBQueueElements_36836 @DBQueueElements_478791

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.

No reverse dependencies extracted.