dbo.TSB_TUUNSGroupB
SQL_TRIGGER parent UNSGroupB
Created 2025-06-27T18:01:21.610 · modified 2026-04-14T23:23:08.873 · 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 | ||
| BaseTreeHasObject | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| dialogColumn | OBJECT_OR_COLUMN | ||
| ESetHasEntitlement | OBJECT_OR_COLUMN | ||
| HelperPersonOrg | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| PersonHasESet | OBJECT_OR_COLUMN | ||
| PersonInBaseTree | 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 | ||
| UNSAccountB | OBJECT_OR_COLUMN | ||
| UNSAccountBHasUNSGroupB | OBJECT_OR_COLUMN | ||
| UNSAccountBInUNSGroupB | OBJECT_OR_COLUMN | ||
| UNSGroupB | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVBigIntToString | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIBitPatternXMarkedForDel | 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.
1create trigger TSB_TUUNSGroupB on UNSGroupB for Update not for Replication as begin declare @parameter nvarchar(256) declare @ObjectkeyOrdered 2 varchar(138) declare @uid_accproduct 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 declare @QBM_BitPatternXMarkedForDel_Out int = dbo.QBM_FGIBitPatternXMarkedForDel 9('|OutStanding|', 0) 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 10 @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update(isForITShop) or update(isITShopOnly) begin declare @FlagTest QBM_YParameterlist 11 insert into @FlagTest(Parameter1, Parameter2, HasContentFull, e.Parameter3) select i.UID_UNSGroupB, i.XObjectKey, i.IsForITShop, dbo.QBM_FCVBigIntToString 12(i.IsITShopOnly) from inserted i exec QER_PIsForITShopFlagCheck 'UNSGroupB', @FlagTest, 'UNSAccountBInUNSGroupB' exec QER_PIsForITShopFlagCheck 13'UNSGroupB', @FlagTest, 'UNSAccountBHasUNSGroupB' end if update(uid_accproduct) begin insert into @ElementBuffer(ObjectKey1, UID1) select X.XObjectKey 14, isnull(x.uid_accproduct,'') from UNSGroupB x join deleted d on x.uid_UNSGroupB = d.uid_UNSGroupB and isnull(x.uid_accproduct,'') <> isnull(d.uid_accproduct 15,'') and d.uid_accproduct > ' ' join dialogColumn c on c.UID_DialogTable = 'QER-T-ITShopOrg' and c.columnname = 'uid_ACCProduct' and c.IsDeactivatedByPreProcessor 16 = 0 select @ElementCount = @@rowcount select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @ObjectkeyOrdered = bu.ObjectKey1 17 , @UID_AccProduct = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex select @whereclauseOrg = @whereclauseMuster select @whereclauseOrg 18 = replace(@whereclauseOrg, N'@ObjectkeyOrdered' , @ObjectkeyOrdered) select @whereclauseOrg = replace(@whereclauseOrg, N'@uid_accproduct' , rtrim(@uid_accproduct 19)) exec QBM_PJobCreate_HOUpdate_B 'ITShopOrg', @whereclauseOrg, @GenProcID , @p1 = 'uid_ACCProduct', @v1 = @uid_accproduct , @AdditionalObjectKeysAffected 20 = DEFAULT select @ElementIndex += 1 end end if update (UID_AccProduct) begin declare @RecalcParameter_OA QBM_YCursorBuffer insert into @RecalcParameter_OA 21 (UID1, ObjectKey1, Ident1) select 'QER-PWODecisionRule-OA', a.XObjectKey, 'I' from inserted i join UNSGroupB g on i.UID_UNSGroupB = g.UID_UNSGroupB 22 join QERAccProductUsage u on g.XObjectKey = u.XObjectKey join AccProduct a on u.UID_AccProduct = a.UID_AccProduct union select 'QER-PWODecisionRule-OA' 23, a.XObjectKey, 'I' from deleted d join UNSGroupB g on d.UID_UNSGroupB = g.UID_UNSGroupB join QERAccProductUsage u on g.XObjectKey = u.XObjectKey 24 join AccProduct a on u.UID_AccProduct = a.UID_AccProduct exec QER_PITShopHelperFill_Recalc @RecalcParameter_OA, @GenprocID declare @RecalcParameter_OA2 25 QBM_YCursorBuffer insert into @RecalcParameter_OA2 (UID1, ObjectKey1, Ident1) select 'QER-PWODecisionRule-OA', pwo.XObjectKey, 'I' from inserted i join 26 UNSGroupB g on i.UID_UNSGroupB = g.UID_UNSGroupB join AccProduct a on i.UID_AccProduct = a.UID_AccProduct join PersonWantsOrg pwo on g.XObjectKey 27 = pwo.ObjectKeyElementUsedInAssign union select 'QER-PWODecisionRule-OA', pwo.XObjectKey, 'I' from deleted d join UNSGroupB g on d.UID_UNSGroupB 28 = g.UID_UNSGroupB join AccProduct a on d.UID_AccProduct = a.UID_AccProduct join PersonWantsOrg pwo on g.XObjectKey = pwo.ObjectKeyElementUsedInAssign 29 exec QER_PITShopHelperFill_Recalc @RecalcParameter_OA2, @GenprocID end if update(MatchPatternForMembership) or update(XMarkedForDeletion) begin declare 30 @GroupsChanged QBM_YParameterList insert into @GroupsChanged (Parameter1, Parameter2) select g.UID_UNSGroupB as uid, g.XObjectKey from UNSGroupB 31 g join deleted d on g.UID_UNSGroupB = d.UID_UNSGroupB where ( g.MatchPatternForMembership <> d.MatchPatternForMembership ) or (g.XMarkedForDeletion 32 & @QBM_BitPatternXMarkedForDel_Out = 0 and d.XMarkedForDeletion & @QBM_BitPatternXMarkedForDel_Out > 0 ) declare @DBQueueElements_01 QBM_YDBQueueRaw insert 33 into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select aig.UID_UNSAccountB as uid from @GroupsChanged g 34 join UNSAccountBInUNSGroupB aig on g.Parameter1 = aig.UID_UNSGroupB and aig.XOrigin > 0 union select aig.UID_UNSAccountB as uid from @GroupsChanged 35 g join UNSAccountBHasUNSGroupB aig on g.Parameter1 = aig.UID_UNSGroupB and aig.XOrigin > 0 union select u.UID_UNSAccountB as uid from @GroupsChanged 36 g join BaseTreeHasObject bho on g.Parameter2 = bho.ObjectKey join PersonInBaseTree pho on bho.UID_Org = pho.UID_Org join UNSAccountB u on u.UID_Person 37 = pho.UID_Person union select u.UID_UNSAccountB as uid from @GroupsChanged g join BaseTreeHasObject bho on g.Parameter2 = bho.ObjectKey join HelperPersonOrg 38 pho on bho.UID_Org = pho.UID_Org join UNSAccountB u on u.UID_Person = pho.UID_Person union select u.UID_UNSAccountB as uid from @GroupsChanged g join 39 ESetHasEntitlement ehe on g.Parameter2 = ehe.Entitlement join PersonHasESet phe on phe.UID_ESet = ehe.UID_ESet join UNSAccountB u on u.UID_Person = phe.UID_Person 40 ) as x exec QBM_PDBQueueInsert_Bulk 'TSB-K-UNSAccountBInUNSGroupB', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR 41 ('', 18, 1) WITH NOWAIT END CATCH ende: return end 42
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.873
creates object-layer jobs via QBM_PJobCreate* inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QER_PIsForITShopFlagCheck, QBM_PJobCreate_HOUpdate_B, QER_PITShopHelperFill_Recalc, QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins QER_VPWOProductNodesSlim, inserted, deleted, UNSGroupB, dialogColumn…
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
- BaseTreeHasObject
- deleted
- dialogColumn
- ESetHasEntitlement
- HelperPersonOrg
- inserted
- PersonHasESet
- PersonInBaseTree
- PersonWantsOrg
- QBM_PDBQueueInsert_Bulk
- QBM_PJobCreate_HOUpdate_B
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YDBQueueRaw
- QBM_YParameterlist
- QER_PIsForITShopFlagCheck
- QER_PITShopHelperFill_Recalc
- QERAccProductUsage
- UNSAccountB
- UNSAccountBHasUNSGroupB
- UNSAccountBInUNSGroupB
- UNSGroupB
- dbo.QBM_FCVBigIntToString
- dbo.QBM_FGIBitPatternXMarkedForDel
- dbo.QBM_FGISessionContext
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
TSB-K-UNSAccountBInUNSGroupBTemp tables / referenced variables
Temp: None extracted.
Variables: @parameter @ObjectkeyOrdered @uid_accproduct @whereclauseOrg @whereclauseMuster @UID_AccProduct @ElementBuffer @ElementCount @ElementIndex @QBM_BitPatternXMarkedForDel_Out @GenProcID @FlagTest @rowcount @p1 @v1 @AdditionalObjectKeysAffected @RecalcParameter_OA @GenprocID @RecalcParameter_OA2 @GroupsChanged @DBQueueElements_01
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.