dbo.QER_TUQERReuseUS

SQL_TRIGGER parent QERReuseUS

Created 2025-06-27T18:01:08.563 · modified 2026-04-14T23:23:08.757 · 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
BaseTreeHasQERReuseUSOBJECT_OR_COLUMN
deletedOBJECT_OR_COLUMN
dialogColumnOBJECT_OR_COLUMN
insertedOBJECT_OR_COLUMN
PersonHasQERReuseUSOBJECT_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
QERReuseUSOBJECT_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_TUQERReuseUS on QERReuseUS  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_QERReuseUSPredecessor) 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 QERReuseUS v join deleted d on d.uid_QERReuseUS = v.UID_QERReuseUS and isnull(v.UID_QERReuseUSPredecessor
12, '') <> ISNULL(d.UID_QERReuseUSPredecessor, '') join PersonHasQERReuseUS phr on phr.UID_QERReuseUS = v.UID_QERReuseUS and phr.XOrigin > 0  ) as x exec
13 QBM_PDBQueueInsert_Bulk 'QER-K-PersonHasQERReuseUS', @DBQueueElements_01 declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object
14, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct phr.UID_org as uid from QERReuseUS v join deleted d on d.uid_QERReuseUS =
15 v.UID_QERReuseUS and isnull(v.UID_QERReuseUSPredecessor, '') <> ISNULL(d.UID_QERReuseUSPredecessor, '') join BaseTreeHasQERReuseUS phr on phr.UID_QERReuseUS
16 = v.UID_QERReuseUS and phr.XOrigin > 0  ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgHasQERReuseUS', @DBQueueElements_02 end if update(isForITShop) or
17 update(isITShopOnly) begin declare @FlagTest QBM_YParameterlist insert into @FlagTest(Parameter1, Parameter2, HasContentFull, e.Parameter3) select i.UID_QERReuseUS
18, i.XObjectKey, i.IsForITShop, dbo.QBM_FCVBigIntToString(i.IsITShopOnly) from inserted i exec QER_PIsForITShopFlagCheck 'QERReuseUS', @FlagTest end    
19 if update(IsNoInheriteToSecurityIncident) begin declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid
20) select x.uid, null, @GenProcID from ( select distinct phr.UID_Person as uid from QERReuseUS v join deleted d on d.uid_QERReuseUS = v.UID_QERReuseUS join
21 PersonHasQERReuseUS phr on phr.UID_QERReuseUS = v.UID_QERReuseUS and phr.XOrigin > 0  where (d.IsNoInheriteToSecurityIncident = 1 and v.IsNoInheriteToSecurityIncident
22 = 0 and phr.XIsInEffect = 0 ) or (d.IsNoInheriteToSecurityIncident = 0 and v.IsNoInheriteToSecurityIncident = 1 and phr.XIsInEffect = 1 ) ) as x exec 
23QBM_PDBQueueInsert_Bulk 'QER-K-PersonHasQERReuseUS', @DBQueueElements_03 end if update(uid_accproduct) begin insert into @ElementBuffer(ObjectKey1, UID1
24) select x.XObjectKey, isnull(x.uid_accproduct,'') from QERReuseUS x join deleted d on x.uid_QERReuseUS = d.uid_QERReuseUS and isnull(x.uid_accproduct,
25'') <> isnull(d.uid_accproduct,'')  and d.uid_accproduct > ' '  join dialogColumn c on c.UID_DialogTable = 'QER-T-ITShopOrg' and c.columnname = 'uid_ACCProduct'
26 and c.IsDeactivatedByPreProcessor = 0  select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top
27 1 @ObjectkeyOrdered = bu.ObjectKey1 , @UID_AccProduct = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex select @whereclauseOrg = 
28@whereclauseMuster select @whereclauseOrg = replace(@whereclauseOrg, N'@ObjectkeyOrdered' , @ObjectkeyOrdered) select @whereclauseOrg = replace(@whereclauseOrg
29, N'@uid_accproduct' , rtrim(@uid_accproduct))    exec QBM_PJobCreate_HOUpdate_B N'ITShopOrg', @whereclauseOrg, @GenProcID , @p1 = 'uid_ACCProduct', @v1
30 = @uid_accproduct , @AdditionalObjectKeysAffected = DEFAULT select @ElementIndex += 1 end  end    if update (UID_AccProduct) begin declare @RecalcParameter_OA
31 QBM_YCursorBuffer insert into @RecalcParameter_OA (UID1, ObjectKey1, Ident1) select 'QER-PWODecisionRule-OA', a.XObjectKey, 'I' from inserted i join QERReuseUS
32 g on i.UID_QERReuseUS = g.UID_QERReuseUS join QERAccProductUsage u on g.XObjectKey = u.XObjectKey join AccProduct a on u.UID_AccProduct = a.UID_AccProduct
33 union select 'QER-PWODecisionRule-OA', a.XObjectKey, 'I' from deleted d join QERReuseUS g on d.UID_QERReuseUS = g.UID_QERReuseUS join QERAccProductUsage
34 u on g.XObjectKey = u.XObjectKey join AccProduct a on u.UID_AccProduct = a.UID_AccProduct exec QER_PITShopHelperFill_Recalc @RecalcParameter_OA, @GenprocID
35 declare @RecalcParameter_OA2 QBM_YCursorBuffer insert into @RecalcParameter_OA2 (UID1, ObjectKey1, Ident1) select 'QER-PWODecisionRule-OA', pwo.XObjectKey
36, 'I' from inserted i join QERReuseUS g on i.UID_QERReuseUS = g.UID_QERReuseUS join AccProduct a on i.UID_AccProduct = a.UID_AccProduct join PersonWantsOrg
37 pwo on g.XObjectKey = pwo.ObjectKeyElementUsedInAssign union select 'QER-PWODecisionRule-OA', pwo.XObjectKey, 'I' from deleted d join QERReuseUS g on 
38d.UID_QERReuseUS = g.UID_QERReuseUS join AccProduct a on d.UID_AccProduct = a.UID_AccProduct join PersonWantsOrg pwo on g.XObjectKey = pwo.ObjectKeyElementUsedInAssign
39 exec QER_PITShopHelperFill_Recalc @RecalcParameter_OA2, @GenprocID end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH
40 NOWAIT END CATCH ende: return end 
41

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

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, QERReuseUS, PersonHasQERReuseUS…

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-PersonHasQERReuseUS QER-K-OrgHasQERReuseUS

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.