Back to OIM Explorer

dbo.QER_FTHelperHeadOrgParents

Inline Table FunctionSQL_INLINE_TABLE_VALUED_FUNCTIONSandbox DB

Inline Table Function.

Source: sandbox-db sys.sql_modules

Source size: 605 characters

Interpretation

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

Relations

  • No extracted relations.

Typed Edges

  • No typed edges extracted for this source.

References

  • No direct source references extracted.

Referenced By

Complete Source

SQL28 lines
1CREATE FUNCTION dbo.QER_FTHelperHeadOrgParents(2  @UID_PersonHead varchar(38)3) RETURNS TABLE4  WITH schemabinding5AS6RETURN(7SELECT8  DISTINCT b.UID_Org AS UID_ParentOrg,9  b.XObjectKey AS XObjectKey10FROM(11SELECT UID_Org12FROM dbo.HelperHeadOrg hho13WHERE14  hho.UID_PersonHead = @UID_PersonHead AND hho.XOrigin > 015UNION all16SELECT UID_Org17FROM dbo.BaseTree18WHERE19  UID_PersonHead = @UID_PersonHead20UNION all21SELECT UID_Org22FROM dbo.BaseTree23WHERE24  UID_PersonHeadSecond = @UID_PersonHead) AS x25JOIN dbo.BaseTreeCollectionF co26  ON x.uid_org = co.uid_org27JOIN dbo.BaseTree b28  ON co.UID_ParentOrg = b.UID_Org)
Open raw exported source
SQL ยท Raw5 lines
1create function dbo.QER_FTHelperHeadOrgParents (@UID_PersonHead varchar(38))  returns table with schemabinding as return ( select distinct b.UID_Org as2 UID_ParentOrg , b.XObjectKey as XObjectKey from ( select UID_Org from dbo.HelperHeadOrg hho where hho.UID_PersonHead = @UID_PersonHead and hho.XOrigin3 > 0  union all select UID_Org from dbo.BaseTree where UID_PersonHead = @UID_PersonHead union all select UID_Org from dbo.BaseTree where UID_PersonHeadSecond4 = @UID_PersonHead ) as x join dbo.BaseTreeCollectionF co on x.uid_org = co.uid_org join dbo.BaseTree b on co.UID_ParentOrg = b.UID_Org ) 5