Database SQL Operation: OrganisationUnit.readRootOrgUnitByIDAndStatus
Description: | Method to return root organization unit for specified organization structure and status. |
Sterotype: | ns |
SELECT
OrganisationUnit.organisationUnitID,
OrganisationUnit.name
INTO
:organisationUnitID,
:name
FROM
OrganisationUnit,
OrgUnitParentLink
WHERE OrgUnitParentLink.organisationStructureID = :organisationStructureID
AND OrgUnitParentLink.parentOrganisationUnitID IS NULL
AND OrganisationUnit.organisationUnitID = OrgUnitParentLink.organisationUnitID
AND OrgUnitParentLink.recordStatus = :recordStatus
|