dbo.POL_TUQERPolicy

SQL_TRIGGER parent QERPolicy

Created 2025-06-27T18:01:19.257 · modified 2026-04-14T23:23:08.737 · 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_PJobCreate_HODelete_LOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_PSQLCheckExecutableOBJECT_OR_COLUMN
QBM_YDBQueueRawTYPE
QBM_YParameterListTYPE
QERPolicyOBJECT_OR_COLUMN
QERPolicyHasObjectOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_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

1create   trigger POL_TUQERPolicy on QERPolicy  for Update not for Replication as begin  declare @SQLToCheck QBM_YParameterList declare @XObjectKeys
2 QBM_YParameterList BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare
3 @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @UID_QERPolicy varchar(38) declare @WhereClause nvarchar(1024) if update
4(WhereClause) begin insert into @SQLToCheck(Parameter1, ContentFull) select c.XObjectKey, 'select top 1 1 as columnvalue from ' + t.TableName + '
5		 where (
6		 '
7 + c.WhereClause + '
8		 )' from inserted c  join DialogTable t on c.UID_DialogTable = t.UID_DialogTable where c.WhereClause > ' ' exec QBM_PSQLCheckExecutable
9 @SQLToCheck, @RaiseError = 1 end  if (update(WhereClause) or update(IsInactive) or update(IsNoWhereClause) ) begin declare @DBQueueElements_01 QBM_YDBQueueRaw
10 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select t.UID_QERPolicy as uid from QERPolicy t join
11 deleted d on t.UID_QERPolicy = d.UID_QERPolicy ) as x exec QBM_PDBQueueInsert_Bulk 'POL-K-QERPolicyMakeProc', @DBQueueElements_01  declare @DBQueueElements_02
12 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select t.UID_QERPolicy as uid from
13 QERPolicy t join deleted d on t.UID_QERPolicy = d.UID_QERPolicy where isnull(t.IsInactive, 0) = 0 ) as x exec QBM_PDBQueueInsert_Bulk 'POL-K-QERPolicyFill'
14, @DBQueueElements_02 end   if update(IsInActive) begin insert into @XObjectKeys (Parameter1) select pho.XObjectKey from deleted d join QERPolicy r on 
15d.uid_QERPolicy = r.uid_QERPolicy join QERPolicyHasObject pho on pho.UID_QERPolicy = r.UID_QERPolicy where (isnull(d.IsInActive, 0) = 0 and isnull(r.IsInActive
16, 0) = 1) exec QBM_PJobCreate_HODelete_L 'QERPolicyHasObject', @XObjectKeys, @GenProcID , @AdditionalObjectKeysAffected = DEFAULT end END TRY BEGIN CATCH
17 exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 
18

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

creates object-layer jobs via QBM_PJobCreate* inserts DBQueue tasks uses session context values has TRY/CATCH error handling

Summary: calls QBM_PSQLCheckExecutable, QBM_PDBQueueInsert_Bulk, QBM_PJobCreate_HODelete_L, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, DialogTable, QERPolicy, QERPolicyHasObject

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

POL-K-QERPolicyMakeProc POL-K-QERPolicyFill

Temp tables / referenced variables

Temp: None extracted.

Variables: @SQLToCheck @XObjectKeys @GenProcID @UID_QERPolicy @WhereClause @RaiseError @DBQueueElements_01 @DBQueueElements_02 @AdditionalObjectKeysAffected

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.