Relationship to the LocAncestor table, used to find whether or not the parent already exists in the system, excluding the locancestor record which represents the top-level ancestor. (locchierarchy.parent = locancestor.location and locchierarchy.systemid = locancestor.systemid) and locancestor.ancestor in (select a.location  from lochierarchy a, locancestor b where b.location=lochierarchy.parent and  b.ancestor=a.location and a.systemid=b.systemid and a.systemid=lochierarchy.systemid and a.parent is not nul ). The resulting set will contain zero or more objects.
Razmerje do tabele LocAncestor, uporabljeno za preverjanje ali vneseni nadrejeni že obstaja v sistemu, izključujoč zapis locancestor, ki predstavlja nadrejenega na najvišji ravni. (locchierarchy.parent = locancestor.location and locchierarchy.systemid = locancestor.systemid) and locancestor.ancestor in (select a.location  from lochierarchy a, locancestor b where b.location=lochierarchy.parent and  b.ancestor=a.location and a.systemid=b.systemid and a.systemid=lochierarchy.systemid and a.parent is not nul ). Nabor rezultatov bo vseboval nič ali več objektov.