Back to OIM Explorer

dbo.CPL_FTCCSPWOCheckDetail

Inline Table FunctionSQL_INLINE_TABLE_VALUED_FUNCTIONSandbox DB

Inline Table Function.

Source: sandbox-db sys.sql_modules

Source size: 982 characters

Interpretation

  • Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.

Relations

  • No extracted relations.

Typed Edges

  • references source dbo.CPL_FTCCSPersonHasObjectWPWO source text reference
  • references source dbo.CPL_FTCCSPWOCheck source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL26 lines
1CREATE FUNCTION dbo.CPL_FTCCSPWOCheckDetail(2  @uid_personwantsorg varchar(38)3) RETURNS TABLE4AS5RETURN(6SELECT7  DISTINCT x.UID_PersonWantsOrg,8  x.UID_Person,9  x.uid_ComplianceRule,10  cs.uid_complianceSubrule,11  pho.IsNew AS isNewObject,12  cm.ObjectKeyElement13FROM(14SELECT15  v.UID_PersonWantsOrg, v.UID_Person, v.UID_ComplianceRule, sign(max(convert(int, cr.IsCrossPersonCheck))) AS IsCrossPersonCheck16FROM dbo.CPL_FTCCSPWOCheck(@uid_personwantsorg) v17JOIN ComplianceRule cr18  ON v.UID_ComplianceRule = cr.UID_ComplianceRule AND cr.IsInActive = 0 AND cr.IsWorkingCopy = 019GROUP BY v.UID_PersonWantsOrg, v.UID_Person, v.UID_ComplianceRule) AS x CROSS apply dbo.CPL_FTCCSPersonHasObjectWPWO(@uid_personwantsorg,20x.IsCrossPersonCheck) pho21JOIN ComplianceSubRule cs22  ON x.uid_complianceRule = cs.uid_complianceRule23JOIN ComplianceSubRuleObject cm24  ON cm.uid_complianceSubrule = cs.uid_complianceSubrule AND pho.Objectkey = cm.ObjectKeyElement25WHERE26  x.UID_Person = pho.UID_Person)
Open raw exported source
SQL ยท Raw8 lines
1create function dbo.CPL_FTCCSPWOCheckDetail(@uid_personwantsorg varchar(38)) returns table as return( select distinct x.UID_PersonWantsOrg, x.UID_Person2, x.uid_ComplianceRule, cs.uid_complianceSubrule , pho.IsNew as isNewObject , cm.ObjectKeyElement  from ( select v.UID_PersonWantsOrg, v.UID_Person, v.UID_ComplianceRule3, sign(max( convert(int, cr.IsCrossPersonCheck))) as IsCrossPersonCheck  from dbo.CPL_FTCCSPWOCheck(@uid_personwantsorg) v join ComplianceRule cr on v.UID_ComplianceRule4 = cr.UID_ComplianceRule  and cr.IsInActive = 0 and cr.IsWorkingCopy = 0  group by v.UID_PersonWantsOrg, v.UID_Person, v.UID_ComplianceRule ) as x cross5 apply dbo.CPL_FTCCSPersonHasObjectWPWO(@uid_personwantsorg, x.IsCrossPersonCheck) pho join ComplianceSubRule cs on x.uid_complianceRule = cs.uid_complianceRule6 join ComplianceSubRuleObject cm on cm.uid_complianceSubrule = cs.uid_complianceSubrule and pho.Objectkey = cm.ObjectKeyElement where x.UID_Person = pho.UID_Person7 ) 8