Database SQL Operation: AppealRelationship.countActiveByAppealIntegratedCase
Description: | Returns any active appealed cases for the same appeal where the integrated case ID for the appealed case is the integrated Case ID for the appeal. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:recordCount
FROM
AppealRelationship,
CaseHeader
WHERE AppealRelationship.appealCaseID = :appealCaseID
AND AppealRelationship.recordStatus = :normalRecordStatus
AND AppealRelationship.caseID = CaseHeader.caseID
AND integratedCaseID in
(
SELECT
integratedCaseID
FROM
Appeal,
CaseHeader
WHERE Appeal.caseID = CaseHeader.caseID
AND Appeal.caseID = :appealCaseID
)
|