dbo.ARS_FTPersonFromEdsva

SQL_TABLE_VALUED_FUNCTION

Created 2026-04-14T23:20:50.413 · modified 2026-04-14T23:20:50.413 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@Ownerlistnvarcharno

Referenced objects

SchemaObjectColumn/minorClass
ADSAccountOBJECT_OR_COLUMN
ADSGroupOBJECT_OR_COLUMN
ADSVAccountInADSGroupOBJECT_OR_COLUMN
QBM_YParameterListTYPE

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1create function dbo.ARS_FTPersonFromEdsva(@Ownerlist nvarchar(max) ) returns @erg table ( UID_Person varchar(38) collate database_default ) AS begin declare
2 @Objects table (element nvarchar(1024) collate database_default  , ElementType int default 0   ) declare @SumDistinct int declare @t1 QBM_YParameterList
3 declare @t2 QBM_YParameterList declare @t3 QBM_YParameterList declare @t4 QBM_YParameterList  insert into @objects (element, ElementType) select e.value
4, case when e.value like 'CN=%' then 1 else 2 end as ElementType from string_split( @Ownerlist, nchar(7)) e where e.value > ' ' select @SumDistinct = sum
5(distinct o.ElementType) from @Objects o  if @SumDistinct in (1,3) begin insert into @t1(Parameter1) select a.UID_Person from @Objects o join ADSAccount
6 a on o.element = a.DistinguishedName where o.ElementType = 1 end if @SumDistinct in (2,3) begin insert into @t2(Parameter1) select a.UID_Person from @Objects
7 o join ADSAccount a on o.element = a.ObjectSID where o.ElementType = 2 end if @SumDistinct in (1,3) begin insert into @t3(Parameter1) select a.UID_Person
8 from @Objects o join ADSGroup g on o.element = g.DistinguishedName join ADSVAccountInADSGroup aig on g.UID_ADSGroup = aig.UID_ADSGroup and aig.XOrigin
9 > 0 and aig.XIsInEffect = 1 join ADSAccount a on aig.UID_ADSAccount = a.UID_ADSAccount where o.ElementType = 1 end if @SumDistinct in (2,3) begin insert
10 into @t4(Parameter1) select a.UID_Person from @Objects o join ADSGroup g on o.element = g.ObjectSID join ADSVAccountInADSGroup aig on g.UID_ADSGroup =
11 aig.UID_ADSGroup and aig.XOrigin > 0 and aig.XIsInEffect = 1 join ADSAccount a on aig.UID_ADSAccount = a.UID_ADSAccount where o.ElementType = 2 end insert
12 into @erg(UID_Person) select t.Parameter1 from @t1 t where t.Parameter1 > ' ' union select t.Parameter1 from @t2 t where t.Parameter1 > ' ' union select
13 t.Parameter1 from @t3 t where t.Parameter1 > ' ' union select t.Parameter1 from @t4 t where t.Parameter1 > ' ' endLabel: return end 
14

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

None extracted.

Summary: writes INSERT into; reads/joins string_split, ADSAccount, ADSGroup, ADSVAccountInADSGroup

Declared parameters

ParameterTypeDirection
@Ownerlistnvarcharinput

DML targets

INSERT into

Called routines

None extracted.

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @Ownerlist @erg @Objects @SumDistinct @t1 @t2 @t3 @t4 @objects

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.ARS_FTAttestationRulerPASQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.ARS_FTITShopRulerPASQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.ARS_FTAttestationRulerPAsource text referenceSQL_TABLE_VALUED_FUNCTION
dbo.ARS_FTITShopRulerPAsource text referenceSQL_TABLE_VALUED_FUNCTION