Operation Details
Description: Method to return position ids active on specified date for specified organization unit and job.
Sterotype: nsmulti
SQL
SELECT
  Position.positionID
INTO
  :positionID 
FROM
  Position,
  PositionHolderLink,
  OrgUnitPositionLink 
WHERE OrgUnitPositionLink.organisationStructureID = :organisationStructureID 
  AND OrgUnitPositionLink.organisationUnitID = :organisationUnitID 
  AND 
  (
    
    (
      Position.positionID = PositionHolderLink.positionID 
    ) 
    AND 
    (
      Position.positionID = OrgUnitPositionLink.positionID 
    ) 
  ) 
  AND Position.jobID = :jobID 
  AND PositionHolderLink.organisationStructureID = :organisationStructureID 
  AND PositionHolderLink.recordStatus = :recordStatus 
  AND PositionHolderLink.fromDate <= :effectiveDate 
  AND 
  (
    PositionHolderLink.toDate >= :effectiveDate 
    OR PositionHolderLink.toDate IS NULL 
  )