SELECT
AppealRelationship.resolutionCode,
CaseHeader.caseID,
caseReference,
HearingDecision.decisionDate,
Appeal.appealTypeCode
INTO
:resolutionCode,
:caseID,
:caseReference,
:decisionDate,
:appealTypeCode
FROM
AppealRelationship,
Appeal,
CaseHeader,
HearingDecision
WHERE Appeal.caseID = AppealRelationship.appealCaseID
AND CaseHeader.caseID = Appeal.caseID
AND HearingDecision.caseID = Appeal.caseID
AND AppealRelationship.caseID = :caseID
AND AppealRelationship.recordStatus = :activeRecordStatus
AND CaseHeader.statusCode = :caseClosedStatus
|