Database SQL Operation: AppealRelationship.countActiveAppealByPriorAppealCase
Description: | Counts the number of active prior appeal cases the appealed case is already on. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:recordCount
FROM
AppealRelationship,
CaseHeader
WHERE AppealRelationship.priorAppealCaseID = :priorAppealCaseID
AND AppealRelationship.appealCaseID = CaseHeader.caseID
AND AppealRelationship.recordStatus = :normalRecordStatus
AND
(
CaseHeader.statusCode = :activeStatusCode
OR CaseHeader.statusCode = :openStatusCode
OR CaseHeader.statusCode = :approvedStatusCode
)
|