Database SQL Operation: AppealRelationship.searchActiveDecisionsByCaseAndAppealType
Description: | Retrieve the list of appeal decisions where the implementation case was an appealed case. Only want CLOSED appeal cases. Only want ACTIVE appealed records. |
Sterotype: | nsmulti |
SELECT
AppealRelationship.resolutionCode,
CaseHeader.caseID,
caseReference,
HearingDecision.decisionDate
INTO
:resolutionCode,
:caseID,
:caseReference,
:decisionDate
FROM
AppealRelationship,
Appeal,
CaseHeader,
HearingDecision
WHERE CaseHeader.caseID = Appeal.caseID
AND Appeal.caseID = appealCaseID
AND Appeal.caseID = HearingDecision.caseID
AND recordStatus = :activeRecordStatus
AND AppealRelationship.caseID = :caseID
AND Appeal.appealTypeCode = :appealTypeCode
AND CaseHeader.statusCode = :caseClosedStatus
|