dbo.QER_FGIITShopNewPersonOrdered

SQL_SCALAR_FUNCTION

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

Open formatted source/search result

Parameters

NameTypeOutput
varcharyes
@UID_PersonWantsOrgvarcharno
@UID_BOTargetvarcharno
@ObjectkeyOrderedvarcharno

Referenced objects

SchemaObjectColumn/minorClass
BaseTreeOBJECT_OR_COLUMN
HelperHeadOrgOBJECT_OR_COLUMN
HelperHeadPersonOBJECT_OR_COLUMN
PersonOBJECT_OR_COLUMN
PersonInBaseTreeOBJECT_OR_COLUMN
PersonWantsOrgOBJECT_OR_COLUMN
QER_VPWOProductNodesSlimOBJECT_OR_COLUMN
dboQBM_FGIConfigparmValueOBJECT_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   function dbo.QER_FGIITShopNewPersonOrdered(@UID_PersonWantsOrg varchar(38) , @UID_BOTarget varchar(38) , @ObjectkeyOrdered varchar(138
2) ) returns varchar(38) as begin return ( select convert(varchar(38), substring(min(z.MinPerson), 11,38)) from ( select concat( str(y.weglaenge) , y.UID_Person
3) as MinPerson from (  select p.UID_Person, 1 as weglaenge from PersonWantsOrg pwo join Person p on pwo.ObjectKeyElementUsedInAssign = p.XObjectKey and
4 p.UID_Person <> pwo.UID_PersonOrdered where pwo.UID_PersonWantsOrg = @UID_PersonWantsOrg union all  select hh.UID_PersonHead, 100 + hh.XOrigin as weglaenge
5 from PersonWantsOrg pwo join Person p on pwo.ObjectKeyElementUsedInAssign = p.XObjectKey and p.UID_Person <> pwo.UID_PersonOrdered join HelperHeadPerson
6 hh on hh.UID_Person = p.UID_Person and hh.XOrigin > 0 where pwo.UID_PersonWantsOrg = @UID_PersonWantsOrg union all  select hh.UID_PersonHead, 200 + hh.XOrigin
7 as weglaenge from PersonWantsOrg pwo join Person p on pwo.ObjectKeyElementUsedInAssign = p.XObjectKey and p.UID_Person <> pwo.UID_PersonOrdered join HelperHeadOrg
8 hh on hh.UID_org = p.UID_Department and hh.XOrigin > 0 where pwo.UID_PersonWantsOrg = @UID_PersonWantsOrg union all  select pio.UID_Person , 300 + pio.XOrigin
9 from PersonInBaseTree pio where pio.UID_Org  = 'QER-AEROLE-ITSHOP-INTERVENTION' and xorigin > 0 union all  select dbo.QBM_FGIConfigparmValue('QER\ITShop\ReplaceAssignmentRequestOnLeaveCU\UID_PersonFallback'
10), 400 as Weglaenge union all      select hh.UID_PersonHead, 1 + hh.XOrigin as weglaenge from PersonWantsOrg pwo join BaseTree o on pwo.ObjectKeyOrgUsedInAssign
11 = o.XObjectKey join HelperHeadOrg hh on o.UID_Org = hh.UID_Org where pwo.UID_PersonWantsOrg = @UID_PersonWantsOrg and isnull(pwo.ObjectKeyElementUsedInAssign
12, '') not like '<Key><T>Person</T><P>%' union all  select pio.UID_Person, 100 + pio.XOrigin as weglaenge from PersonWantsOrg pwo join BaseTree o on pwo.ObjectKeyOrgUsedInAssign
13 = o.XObjectKey join PersonInBaseTree pio on o.UID_Org = pio.UID_Org where pwo.UID_PersonWantsOrg = @UID_PersonWantsOrg and isnull(pwo.ObjectKeyElementUsedInAssign
14, '') not like '<Key><T>Person</T><P>%'          ) as y  join PersonInBaseTree pcu on y.UID_Person = pcu.UID_Person join BaseTree cu on pcu.UID_Org = cu.UID_Org
15 join BaseTree sh on cu.UID_ParentOrg = sh.UID_Org join BaseTree bo on bo.UID_ParentOrg = sh.UID_Org join BaseTree pr on pr.UID_ParentOrg = bo.UID_Org 
16join QER_VPWOProductNodesSlim n on n.UID_OrgPR = pr.UID_Org and n.ObjectkeyOrdered = @ObjectkeyOrdered where 1 = 1   and ( ( @UID_BOTarget > ' ' and bo.UID_Org
17 = @UID_BOTarget ) or (isnull(@UID_BOTarget, '') = ''  ) ) ) as z where dbo.QBM_FGIConfigparmValue('QER\ITShop\ReplaceAssignmentRequestOnLeaveCU') > ' '
18 ) end 
19

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:38.927

None extracted.

Summary: reads/joins PersonWantsOrg, Person, HelperHeadPerson, HelperHeadOrg, PersonInBaseTree…; uses config QER\ITShop\ReplaceAssignmentRequestOnLeaveCU\UID_PersonFallback, QER\ITShop\ReplaceAssignmentRequestOnLeaveCU

Declared parameters

ParameterTypeDirection
varchar(38)OUTPUT
@UID_PersonWantsOrgvarchar(38)input
@UID_BOTargetvarchar(38)input
@ObjectkeyOrderedvarchar(138)input

DML targets

None extracted.

Called routines

None extracted.

Config/session

Config: QER\ITShop\ReplaceAssignmentRequestOnLeaveCU\UID_PersonFallback QER\ITShop\ReplaceAssignmentRequestOnLeaveCU

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @UID_PersonWantsOrg @UID_BOTarget @ObjectkeyOrdered

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.

Referencing objectRelationEvidence
dbo.QER_PITShopOrderMove_bulkSQL expression dependencydbo · OBJECT_OR_COLUMN