Back to OIM Explorer

dbo.RMB_FTAttestationRulerAO

Inline Table FunctionSQL_INLINE_TABLE_VALUED_FUNCTIONSandbox DB

Inline Table Function.

Source: sandbox-db sys.sql_modules

Source size: 798 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.RMB_FTAttestationRulerAO(2  @UID_AttestationCase varchar(38)3) RETURNS TABLE4AS5RETURN(6SELECT7  DISTINCT ro.uid_person8FROM(9SELECT10  p.uid_person, p.uid_Org 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_Org 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 o27  ON o.uid_org = pp.uid_PersonFK CROSS apply dbo.ATT_FTOrgAttHighest(o.uid_Org, NULL, NULL, 1, 0) ro)
Open raw exported source
SQL ยท Raw7 lines
1create function dbo.RMB_FTAttestationRulerAO (@UID_AttestationCase varchar(38) ) RETURNS TABLE AS RETURN ( select distinct ro.uid_person from (select p.uid_person2, p.uid_Org as UID_PersonFK , @UID_AttestationCase as UID_AttestationCase from person p join attestationcase ac on ac.ObjectKeyBase = p.XObjectKey where3 ac.UID_AttestationCase = @UID_AttestationCase union select p.uid_person, p.uid_Org as UID_PersonFK , @UID_AttestationCase as UID_AttestationCase from 4attestationcase 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 o on o.uid_org = pp.uid_PersonFK cross apply dbo.ATT_FTOrgAttHighest (o.uid_Org , null , null , 1 , 0  )6 ro   ) 7