dbo.CPL_FTCCSPersonCheckWithOrg
SQL_INLINE_TABLE_VALUED_FUNCTION
Created 2026-04-14T23:18:41.780 · modified 2026-04-14T23:18:41.780 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@UID_Person | varchar | no |
@UID_Org | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| BaseTree | OBJECT_OR_COLUMN | ||
| BaseTreeHasObject | OBJECT_OR_COLUMN | ||
| compliancerule | OBJECT_OR_COLUMN | ||
| ComplianceSubRule | OBJECT_OR_COLUMN | ||
| ComplianceSubRuleObject | OBJECT_OR_COLUMN | ||
| PersonHasObject | OBJECT_OR_COLUMN | ||
| personinBaseTree | OBJECT_OR_COLUMN | ||
| dbo | CPL_FTComplianceSubRulePerson | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1create function dbo.CPL_FTCCSPersonCheckWithOrg(@UID_Person varchar(38) , @UID_Org varchar(38) ) returns table as return( select x.UID_Person, x.UID_ComplianceRule 2 , cr.UID_NonCompliance , x.isExceptionGranted , x.IsNew from ( select ps.UID_Person, ps.UID_ComplianceRule , isnull(pinc.IsExceptionGranted, 0) as isExceptionGranted 3 , sign(len(isnull(pinc.UID_Org,''))) ^ 1 as IsNew from ( select sr.UID_ComplianceRule, sr.UID_ComplianceSubRule, @UID_Person as UID_Person from ComplianceSubRule 4 sr join ComplianceSubRuleObject cm on cm.uid_ComplianceSubRule = sr.uid_ComplianceSubRule cross apply dbo.CPL_FTComplianceSubRulePerson(sr.uid_complianceRule 5) cp join ( select @UID_Person as UID_Person, p1.ObjectKey from PersonHasObject p1 where p1.UID_Person = @UID_Person union select @UID_Person, b1.ObjectKey 6 from BaseTreeHasObject b1 where b1.UID_Org = @UID_Org union select @UID_Person, b1.XObjectKey as ObjectKey from BaseTree b1 where b1.UID_Org = @UID_Org 7 ) as pho on cp.uid_person = @UID_Person and pho.UID_Person = @UID_Person and pho.Objectkey = cm.ObjectKeyElement group by sr.UID_ComplianceRule, sr.UID_ComplianceSubRule 8, sr.CountMatchesMin, pho.UID_Person having COUNT(cm.ObjectKeyElement) >= case sr.CountMatchesMin when 0 then 1 else sr.CountMatchesMin end ) as ps join 9 compliancerule cr on ps.uid_complianceRule = cr.uid_complianceRule and cr.IsInActive = 0 and cr.IsWorkingCopy = 0 left outer join personinBaseTree 10pinc on pinc.uid_person = ps.uid_person and pinc.uid_org = cr.uid_noncompliance group by ps.uid_person, ps.uid_ComplianceRule, isnull(pinc.uid_org,'') 11, isnull(pinc.isexceptiongranted, 0) having count(distinct ps.uid_ComplianceSubRule) = (select count( * ) from ComplianceSubrule where uid_complianceRule 12 = ps.uid_complianceRule ) ) as x join ComplianceRule cr on x.UID_ComplianceRule = cr.UID_ComplianceRule and cr.IsInActive = 0 and cr.IsWorkingCopy = 130 ) 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:18:41.780
None extracted.
Summary: reads/joins ComplianceSubRule, ComplianceSubRuleObject, PersonHasObject, BaseTreeHasObject, BaseTree…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@UID_Person | varchar(38) | input |
@UID_Org | varchar(38) | input |
DML targets
None extracted.Called routines
None extracted.
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @UID_Person @UID_Org
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.