V_QUERY_SPONSORSHIPLOCATIONPARENT

Returns the parent locations for a sponsorship location.

Fields

Field Field Type Null Description
SEARCHLOCATIONID uniqueidentifier SEARCHLOCATIONID
PARENTLOCATIONID uniqueidentifier PARENTLOCATIONID

Definition

Copy
/*
Generated by Blackbaud AppFx Platform
Date:  3/19/2013 1:28:39 AM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=3.0.504.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE VIEW dbo.V_QUERY_SPONSORSHIPLOCATIONPARENT AS



select
    SEARCHLOCATION.ID SEARCHLOCATIONID,
    PARENTLOCATION.ID PARENTLOCATIONID
from dbo.SPONSORSHIPLOCATION PARENTLOCATION
inner join dbo.SPONSORSHIPLOCATION SEARCHLOCATION on SEARCHLOCATION.HIERARCHYPATH.IsDescendantOf(PARENTLOCATION.HIERARCHYPATH) = 1