dbo.ATT_FTAttestationRulerAP
Inline Table FunctionSQL_INLINE_TABLE_VALUED_FUNCTIONSandbox DB
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.ATT_FTOrgAttHighest source text reference
Complete Source
1CREATE FUNCTION dbo.ATT_FTAttestationRulerAP(2 @UID_AttestationCase varchar(38)3) RETURNS TABLE4AS5RETURN(6SELECT7 DISTINCT ro.uid_person8FROM(9SELECT10 p.uid_person, p.uid_ProfitCenter AS UID_PersonFK, @UID_AttestationCase AS UID_AttestationCase11FROM person p12JOIN attestationcase ac13 ON ac.ObjectKeyBase = p.XObjectKey14WHERE15 ac.UID_AttestationCase = @UID_AttestationCase16UNION17SELECT18 p.uid_person, p.uid_ProfitCenter AS UID_PersonFK, @UID_AttestationCase AS UID_AttestationCase19FROM attestationcase ac20JOIN Personwantsorg pwo21 ON ac.ObjectKeyBase = pwo.XObjectKey22JOIN person p23 ON pwo.uid_personOrdered = p.uid_person24WHERE25 ac.UID_AttestationCase = @UID_AttestationCase) AS pp26JOIN BaseTree pf27 ON pf.uid_org = pp.uid_PersonFK CROSS apply dbo.ATT_FTOrgAttHighest(pf.uid_Org, NULL, NULL, 1, 0) ro)
Open raw exported source
1create function dbo.ATT_FTAttestationRulerAP (@UID_AttestationCase varchar(38) ) RETURNS TABLE AS RETURN ( select distinct ro.uid_person from (select p.uid_person2, p.uid_ProfitCenter as UID_PersonFK , @UID_AttestationCase as UID_AttestationCase from person p join attestationcase ac on ac.ObjectKeyBase = p.XObjectKey3 where ac.UID_AttestationCase = @UID_AttestationCase union select p.uid_person, p.uid_ProfitCenter as UID_PersonFK , @UID_AttestationCase as UID_AttestationCase4 from attestationcase ac join Personwantsorg pwo on ac.ObjectKeyBase = pwo.XObjectKey join person p on pwo.uid_personOrdered = p.uid_person where ac.UID_AttestationCase5 = @UID_AttestationCase ) as pp join BaseTree pf on pf.uid_org = pp.uid_PersonFK cross apply dbo.ATT_FTOrgAttHighest (pf.uid_Org , null , null , 1 , 06 ) ro ) 7