Back to OIM Explorer

dbo.ATT_FTAttestationRulerAL

Inline Table FunctionSQL_INLINE_TABLE_VALUED_FUNCTIONSandbox DB

Inline Table Function.

Source: sandbox-db sys.sql_modules

Source size: 812 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.ATT_FTOrgAttHighest source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL27 lines
1CREATE FUNCTION dbo.ATT_FTAttestationRulerAL(2  @UID_AttestationCase varchar(38)3) RETURNS TABLE4AS5RETURN(6SELECT7  DISTINCT ro.uid_person8FROM(9SELECT10  p.uid_person, p.uid_Locality 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_Locality 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 loc27  ON loc.uid_org = pp.uid_PersonFK CROSS apply dbo.ATT_FTOrgAttHighest(loc.uid_Org, NULL, NULL, 1, 0) ro)
Open raw exported source
SQL ยท Raw7 lines
1create function dbo.ATT_FTAttestationRulerAL (@UID_AttestationCase varchar(38) ) RETURNS TABLE AS RETURN ( select distinct ro.uid_person from (select p.uid_person2, p.uid_Locality 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_Locality 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 loc on loc.uid_org = pp.uid_PersonFK cross apply dbo.ATT_FTOrgAttHighest (loc.uid_Org , null , null , 1 6, 0  ) ro ) 7