dbo.QER_TUQERReuse

SQL_TRIGGER parent QERReuse

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

Open formatted source/search result

Parameters

NameTypeOutput
No parameters.

Referenced objects

SchemaObjectColumn/minorClass
AccProductOBJECT_OR_COLUMN
BaseTreeHasQERReuseOBJECT_OR_COLUMN
deletedOBJECT_OR_COLUMN
dialogColumnOBJECT_OR_COLUMN
insertedOBJECT_OR_COLUMN
PersonHasQERReuseOBJECT_OR_COLUMN
PersonWantsOrgOBJECT_OR_COLUMN
QBM_PDBQueueInsert_BulkOBJECT_OR_COLUMN
QBM_PJobCreate_HOUpdate_BOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBM_YDBQueueRawTYPE
QBM_YParameterlistTYPE
QER_PIsForITShopFlagCheckOBJECT_OR_COLUMN
QER_PITShopHelperFill_RecalcOBJECT_OR_COLUMN
QERAccProductUsageOBJECT_OR_COLUMN
QERReuseOBJECT_OR_COLUMN
dboQBM_FCVBigIntToStringOBJECT_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

1 create   trigger QER_TUQERReuse on QERReuse  for Update not for Replication as begin  declare @ObjectkeyOrdered varchar(138) declare @UID_AccProduct
2 varchar(38) declare @whereclauseOrg nvarchar(max) declare @whereclauseMuster nvarchar(max) = ' UID_ITShopOrg in ( select UID_OrgPR 
3							from QER_VPWOProductNodesSlim
4							where ObjectkeyOrdered = ''@ObjectkeyOrdered'' 
5								and isnull(UID_AccProduct, '''') <> ''@UID_AccProduct''
6					)
7'
8 declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int BEGIN TRY if exists (select top 1 1 from inserted) goto start
9 if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update
10(UID_QERReusePredecessor) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid
11, null, @GenProcID from ( select distinct phr.UID_Person as uid from QERReuse v join deleted d on d.uid_QERReuse = v.UID_QERReuse and isnull(v.UID_QERReusePredecessor
12, '') <> ISNULL(d.UID_QERReusePredecessor, '') join PersonHasQERReuse phr on phr.UID_QERReuse = v.UID_QERReuse and phr.XOrigin > 0  ) as x exec QBM_PDBQueueInsert_Bulk
13 'QER-K-PersonHasQERReuse', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object, subobject, genprocid
14) select x.uid, null, @GenProcID from ( select distinct phr.UID_org as uid from QERReuse v join deleted d on d.uid_QERReuse = v.UID_QERReuse and isnull
15(v.UID_QERReusePredecessor, '') <> ISNULL(d.UID_QERReusePredecessor, '') join BaseTreeHasQERReuse phr on phr.UID_QERReuse = v.UID_QERReuse and phr.XOrigin
16 > 0  ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgHasQERReuse', @DBQueueElements_02 end if update(isForITShop) or update(isITShopOnly) begin declare 
17@FlagTest QBM_YParameterlist insert into @FlagTest(Parameter1, Parameter2, HasContentFull, e.Parameter3) select i.UID_QERReuse, i.XObjectKey, i.IsForITShop
18, dbo.QBM_FCVBigIntToString(i.IsITShopOnly) from inserted i exec QER_PIsForITShopFlagCheck 'QERReuse', @FlagTest end  if update(IsNoInheriteToSecurityIncident
19) begin declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select x.uid, null, @GenProcID from 
20( select distinct phr.UID_Person as uid from QERReuse v join deleted d on d.uid_QERReuse = v.UID_QERReuse join PersonHasQERReuse phr on phr.UID_QERReuse
21 = v.UID_QERReuse and phr.XOrigin > 0  where (d.IsNoInheriteToSecurityIncident = 1 and v.IsNoInheriteToSecurityIncident = 0 and phr.XIsInEffect = 0 ) or
22 (d.IsNoInheriteToSecurityIncident = 0 and v.IsNoInheriteToSecurityIncident = 1 and phr.XIsInEffect = 1 ) ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-PersonHasQERReuse'
23, @DBQueueElements_03 end if update(uid_accproduct) begin insert into @ElementBuffer(ObjectKey1, UID1) select x.XObjectKey, isnull(x.uid_accproduct,'')
24 from QERReuse x join deleted d on x.uid_QERReuse = d.uid_QERReuse and isnull(x.uid_accproduct,'') <> isnull(d.uid_accproduct,'')  and d.uid_accproduct
25 > ' '  join dialogColumn c on c.UID_DialogTable = 'QER-T-ITShopOrg' and c.columnname = 'uid_ACCProduct' and c.IsDeactivatedByPreProcessor = 0  select 
26@ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @ObjectkeyOrdered = bu.ObjectKey1 , @UID_AccProduct
27 = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex select @whereclauseOrg = @whereclauseMuster select @whereclauseOrg = replace(@whereclauseOrg
28, N'@ObjectkeyOrdered' , @ObjectkeyOrdered) select @whereclauseOrg = replace(@whereclauseOrg, N'@uid_accproduct' , rtrim(@uid_accproduct))    exec QBM_PJobCreate_HOUpdate_B
29 N'ITShopOrg', @whereclauseOrg, @GenProcID , @p1 = 'uid_ACCProduct', @v1 = @uid_accproduct , @AdditionalObjectKeysAffected = DEFAULT select @ElementIndex
30 += 1 end  end if update (UID_AccProduct) begin declare @RecalcParameter_OA QBM_YCursorBuffer insert into @RecalcParameter_OA (UID1, ObjectKey1, Ident1
31) select 'QER-PWODecisionRule-OA', a.XObjectKey, 'I' from inserted i join QERReuse g on i.UID_QERReuse = g.UID_QERReuse join QERAccProductUsage u on g.XObjectKey
32 = u.XObjectKey join AccProduct a on u.UID_AccProduct = a.UID_AccProduct union select 'QER-PWODecisionRule-OA', a.XObjectKey, 'I' from deleted d join QERReuse
33 g on d.UID_QERReuse = g.UID_QERReuse join QERAccProductUsage u on g.XObjectKey = u.XObjectKey join AccProduct a on u.UID_AccProduct = a.UID_AccProduct
34 exec QER_PITShopHelperFill_Recalc @RecalcParameter_OA, @GenprocID declare @RecalcParameter_OA2 QBM_YCursorBuffer insert into @RecalcParameter_OA2 (UID1
35, ObjectKey1, Ident1) select 'QER-PWODecisionRule-OA', pwo.XObjectKey, 'I' from inserted i join QERReuse g on i.UID_QERReuse = g.UID_QERReuse join AccProduct
36 a on i.UID_AccProduct = a.UID_AccProduct join PersonWantsOrg pwo on g.XObjectKey = pwo.ObjectKeyElementUsedInAssign union select 'QER-PWODecisionRule-OA'
37, pwo.XObjectKey, 'I' from deleted d join QERReuse g on d.UID_QERReuse = g.UID_QERReuse join AccProduct a on d.UID_AccProduct = a.UID_AccProduct join PersonWantsOrg
38 pwo on g.XObjectKey = pwo.ObjectKeyElementUsedInAssign exec QER_PITShopHelperFill_Recalc @RecalcParameter_OA2, @GenprocID end  END TRY BEGIN CATCH exec
39 QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 
40

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

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

Summary: calls QBM_PDBQueueInsert_Bulk, QER_PIsForITShopFlagCheck, QBM_PJobCreate_HOUpdate_B, QER_PITShopHelperFill_Recalc, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins QER_VPWOProductNodesSlim, inserted, deleted, QERReuse, PersonHasQERReuse…

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

QER-K-PersonHasQERReuse QER-K-OrgHasQERReuse

Temp tables / referenced variables

Temp: None extracted.

Variables: @ObjectkeyOrdered @UID_AccProduct @whereclauseOrg @whereclauseMuster @ElementBuffer @ElementCount @ElementIndex @GenProcID @DBQueueElements_01 @DBQueueElements_02 @FlagTest @DBQueueElements_03 @ROWCOUNT @uid_accproduct @p1 @v1 @AdditionalObjectKeysAffected @RecalcParameter_OA @GenprocID @RecalcParameter_OA2

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.