dbo.QER_ZPersonHasQERResource

SQL_STORED_PROCEDURE

Created 2025-06-27T18:01:07.260 · modified 2026-04-14T23:20:39.977 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
BaseTreeHasQERResourceOBJECT_OR_COLUMN
ESetHasEntitlementOBJECT_OR_COLUMN
personOBJECT_OR_COLUMN
PersonHasESetOBJECT_OR_COLUMN
PersonHasQERResourceOBJECT_OR_COLUMN
QBM_PDBQueueCalculateDeltaOBJECT_OR_COLUMN
QBM_PJournalOBJECT_OR_COLUMN
QBM_PMNTableInsertOBJECT_OR_COLUMN
QBM_PMNTableOriginUpdateOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YDataForDeltaTYPE
QBM_YDBQueueCurrentTYPE
QBMDBQueueCurrentOBJECT_OR_COLUMN
QERResourceOBJECT_OR_COLUMN
dboQBM_FGIBitPatternXOriginOBJECT_OR_COLUMN
dboQBM_FGIModuleExistsOBJECT_OR_COLUMN
dboQER_FTPersonInheritFromOrg_LOBJECT_OR_COLUMN
dboQER_FTQERResourcePredecessorOBJECT_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   procedure QER_ZPersonHasQERResource (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , 
2@CountDeltaOrigin int declare @GenProcID varchar(38) declare @Xdate datetime = getutcdate() declare @XUser nvarchar(64) = object_name(@@procid) declare
3 @DebugSwitch int = 0 declare @DebugLevel varchar(1) = 'W' declare @CountRows int declare @DebugMessage nvarchar(1000) declare @UID_BaseTreeAssignToUse
4 varchar(38) = 'QER-AsgnBT-QERResource' declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXOrigin_Inherit int = dbo.QBM_FGIBitPatternXOrigin
5('|Inherit|', 0) declare @QBM_BitPatternXOrigin_Inherit_inv int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 1)  BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue
6, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast
7) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end  insert into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement
8, XOriginBefore , XIsInEffectBefore, XIsInEffectAfter ) select 0, 0 , phr.UID_Person, phr.UID_QERResource as UID_QERResource, phr.XOrigin , phr.XIsInEffect
9, 0 from PersonHasQERResource phr join @DBQueueCurrent x on phr.UID_Person = x.uid_parameter  select @CountRows = @@ROWCOUNT if @DebugSwitch > 0 begin 
10select @DebugMessage = 'vorher ' + STR(@CountRows) exec QBM_PJournal @DebugMessage, @@PROCID, 'D', @DebugLevel end insert into @SourceData( IsUpcommingContent
11, XOriginBefore, XOriginAfter , Element, AssignedElement , XIsInEffectBefore, XIsInEffectAfter ) select 1, 0, case when pd.UID_QERResource = pd.UID_QERResourcePredecessor
12 then phr.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv else @QBM_BitPatternXOrigin_Inherit end , phr.UID_person, pd.UID_QERResourcePredecessor as UID_QERResource
13 , 0,  case when pd.UID_QERResource = pd.UID_QERResourcePredecessor then 1 else (r.IsNoInheriteToSecurityIncident & p.IsSecurityIncident) ^1 end from PersonHasQERResource
14 phr join @DBQueueCurrent x on UID_person = x.uid_parameter  join person p on phr.uid_person = p.uid_person  join QERResource r on phr.uid_QERResource 
15= r.uid_QERResource cross apply dbo.QER_FTQERResourcePredecessor(r.UID_QERResource) pd  where phr.XOrigin & @QBM_BitPatternXOrigin_Inherit_inv > 0 select
16 @CountRows = @@ROWCOUNT if @DebugSwitch > 0 begin select @DebugMessage = 'direkt ' + STR(@CountRows) exec QBM_PJournal @DebugMessage, @@PROCID, 'D', @DebugLevel
17 end insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter , XIsInEffectBefore, XIsInEffectAfter ) select
18 1, 0 , x.UID_person,pd.UID_QERResourcePredecessor as UID_QERResource , @QBM_BitPatternXOrigin_Inherit as XOrigin , 0, (r.IsNoInheriteToSecurityIncident
19 & p.IsSecurityIncident) ^1 from ( select pha.UID_person, r.UID_QERResource from @DBQueueCurrent x join PersonHasESet pha on pha.UID_person = x.uid_parameter
20 and pha.XOrigin > 0 and pha.XIsInEffect = 1  join person px on pha.uid_person = px.uid_person and px.isNoInherite = 0  join ESetHasEntitlement aha on 
21pha.UID_ESet = aha.UID_ESet and aha.XOrigin > 0 and aha.XIsInEffect = 1 and dbo.QBM_FGIModuleExists('RMS') = 1 Join QERResource r on aha.Entitlement = 
22r.XObjectKey union all select pfo.UID_person, oha.UID_QERResource  from dbo.QER_FTPersonInheritFromOrg_L(@DBQueueCurrent, @UID_BaseTreeAssignToUse) pfo
23 join BaseTreeHasQERResource oha on oha.uid_org = pfo.uid_org and oha.XOrigin > 0 and oha.XIsInEffect = 1 ) as x join person p on x.uid_person = p.uid_person
24 join QERResource r on x.uid_QERResource = r.uid_QERResource cross apply dbo.QER_FTQERResourcePredecessor(r.UID_QERResource) pd select @CountRows = @@ROWCOUNT
25 if @DebugSwitch > 0 begin select @DebugMessage = 'indirekt ' + STR(@CountRows) exec QBM_PJournal @DebugMessage, @@PROCID, 'D', @DebugLevel end  exec QBM_PDBQueueCalculateDelta
26 @SourceData, @DeltaQuantity = 0, @DeltaDelete = 0, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin
27 = @CountDeltaOrigin output , @UseIsInEffect = 1 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent if @CountDeltaOrigin > 0 begin exec
28 QBM_PMNTableOriginUpdate 'PersonHasQERResource', 'uid_Person', 'uid_QERResource' end if @CountDeltaQantity > 0 begin exec QBM_PMNTableInsert 'PersonHasQERResource'
29, 'uid_Person', 'uid_QERResource', @TargetIsView = 0 , @FKTableNameElement = 'Person' , @FKColumnNameElement = 'UID_Person' end END TRY BEGIN CATCH exec
30 QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH  endLabel: return end 
31

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:20:39.977

has TRY/CATCH error handling

Summary: calls QBM_PJournal, QBM_PDBQueueCalculateDelta, QBM_PMNTableOriginUpdate, QBM_PMNTableInsert, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, PersonHasQERResource, person, QERResource, PersonHasESet…

Declared parameters

ParameterTypeDirection
@SlotNumberintinput

DML targets

INSERT into

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @GenProcID @Xdate @XUser @procid @DebugSwitch @DebugLevel @CountRows @DebugMessage @UID_BaseTreeAssignToUse @DBQueueCurrent @QBM_BitPatternXOrigin_Inherit @QBM_BitPatternXOrigin_Inherit_inv @rowcount @SourceData @ROWCOUNT @PROCID @DeltaQuantity @DeltaDelete @DeltaInsert @DeltaOrigin @UseIsInEffect @DBQueueCurrentExtern @TargetIsView @FKTableNameElement @FKColumnNameElement

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.