Operation Details
Description: Count number of organization units which are active based on organization unit name.
Sterotype: ns
SQL
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