Database SQL Operation: OrganisationUnit.countActiveOrgUnitsByName
Description: | Count number of organization units which are active based on organization unit name. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:count
FROM
OrganisationUnit,
OrgUnitParentLink
WHERE OrgUnitParentLink.organisationStructureID = :organisationStructureID
AND UPPER(OrganisationUnit.name) = :name
AND OrganisationUnit.recordStatus = :recordStatus
AND OrganisationUnit.organisationUnitID = OrgUnitParentLink.organisationUnitID
AND OrgUnitParentLink.recordStatus = :recordStatus
|