Database SQL Operation: PaidEmployment.countCurrentActivePaidEmploymentEmployments
Description: | This method counts the number of active employment records for a participant on a case evidence tree. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:recordCount
FROM
PaidEmployment,
Employment
WHERE PaidEmployment.evidenceID = :evidenceID
AND PaidEmployment.employmentID = Employment.employmentID
AND Employment.concernRoleID = :concernRoleID
AND Employment.status = :statusCode
AND Employment.fromDate <= :effectiveDate
AND
(
Employment.toDate >= :effectiveDate
OR Employment.toDate IS NULL
)
|