dbo.QER_TUQERResource
SQL_TRIGGER parent QERResource
Created 2025-06-27T18:01:08.530 · modified 2026-04-14T23:23:08.747 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| AccProduct | OBJECT_OR_COLUMN | ||
| BaseTreeHasQERResource | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| dialogColumn | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| PersonHasQERResource | OBJECT_OR_COLUMN | ||
| PersonWantsOrg | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PJobCreate_HOUpdate_B | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YParameterlist | TYPE | ||
| QER_PIsForITShopFlagCheck | OBJECT_OR_COLUMN | ||
| QER_PITShopHelperFill_Recalc | OBJECT_OR_COLUMN | ||
| QERAccProductUsage | OBJECT_OR_COLUMN | ||
| QERResource | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVBigIntToString | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create trigger QER_TUQERResource on QERResource 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(isForITShop) or update(isITShopOnly) begin declare @FlagTest QBM_YParameterlist insert into @FlagTest(Parameter1, Parameter2, HasContentFull, e.Parameter3 11) select i.UID_QERResource, i.XObjectKey, i.IsForITShop, dbo.QBM_FCVBigIntToString(i.IsITShopOnly) from inserted i exec QER_PIsForITShopFlagCheck 'QERResource' 12, @FlagTest end if update(IsNoInheriteToSecurityIncident) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject 13, genprocid) select x.uid, null, @GenProcID from ( select distinct phr.UID_Person as uid from QERResource v join deleted d on d.uid_QERResource = v.UID_QERResource 14 join PersonHasQERResource phr on phr.UID_QERResource = v.UID_QERResource and phr.XOrigin > 0 where (d.IsNoInheriteToSecurityIncident = 1 and v.IsNoInheriteToSecurityIncident 15 = 0 and phr.XIsInEffect = 0 ) or (d.IsNoInheriteToSecurityIncident = 0 and v.IsNoInheriteToSecurityIncident = 1 and phr.XIsInEffect = 1 ) ) as x exec 16QBM_PDBQueueInsert_Bulk 'QER-K-PersonHasQERResource', @DBQueueElements_01 end if update(UID_QERResourcePredecessor) begin declare @DBQueueElements_02 QBM_YDBQueueRaw 17 insert into @DBQueueElements_02 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select distinct phr.UID_Person as uid from QERResource 18 v join deleted d on d.uid_QERResource = v.UID_QERResource and isnull(v.UID_QERResourcePredecessor, '') <> ISNULL(d.UID_QERResourcePredecessor, '') join 19 PersonHasQERResource phr on phr.UID_QERResource = v.UID_QERResource and phr.XOrigin > 0 ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-PersonHasQERResource' 20, @DBQueueElements_02 declare @DBQueueElements_03 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select x.uid, null, @GenProcID 21 from ( select distinct phr.UID_org as uid from QERResource v join deleted d on d.uid_QERResource = v.UID_QERResource and isnull(v.UID_QERResourcePredecessor 22, '') <> ISNULL(d.UID_QERResourcePredecessor, '') join BaseTreeHasQERResource phr on phr.UID_QERResource = v.UID_QERResource and phr.XOrigin > 0 ) as 23x exec QBM_PDBQueueInsert_Bulk 'QER-K-OrgHasQERResource', @DBQueueElements_03 end if update(uid_accproduct) begin insert into @ElementBuffer(ObjectKey1 24, UID1) select x.XObjectKey, isnull(x.uid_accproduct,'') from QERResource x join deleted d on x.uid_QERResource = d.uid_QERResource 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 QERResource 32 g on i.UID_QERResource = g.UID_QERResource 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 QERResource g on d.UID_QERResource = g.UID_QERResource 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 QERResource g on i.UID_QERResource = g.UID_QERResource 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 QERResource g on 38 d.UID_QERResource = g.UID_QERResource 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.747
creates object-layer jobs via QBM_PJobCreate* inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QER_PIsForITShopFlagCheck, QBM_PDBQueueInsert_Bulk, QBM_PJobCreate_HOUpdate_B, QER_PITShopHelperFill_Recalc, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins QER_VPWOProductNodesSlim, inserted, deleted, QERResource, PersonHasQERResource…
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE notCalled routines
Read/join references
SQL dependency metadata
- AccProduct
- BaseTreeHasQERResource
- deleted
- dialogColumn
- inserted
- PersonHasQERResource
- PersonWantsOrg
- QBM_PDBQueueInsert_Bulk
- QBM_PJobCreate_HOUpdate_B
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YDBQueueRaw
- QBM_YParameterlist
- QER_PIsForITShopFlagCheck
- QER_PITShopHelperFill_Recalc
- QERAccProductUsage
- QERResource
- dbo.QBM_FCVBigIntToString
- dbo.QBM_FGISessionContext
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
QER-K-PersonHasQERResource QER-K-OrgHasQERResourceTemp tables / referenced variables
Temp: None extracted.
Variables: @ObjectkeyOrdered @UID_AccProduct @whereclauseOrg @whereclauseMuster @ElementBuffer @ElementCount @ElementIndex @GenProcID @FlagTest @DBQueueElements_01 @DBQueueElements_02 @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.