SELECT
AppealRelationship.caseID,
AppealRelationship.priorAppealCaseID,
AppealedCase.caseReference,
CaseHeader.caseReference,
AppealRelationship.receivedDate,
AppealRelationship.reasonCode,
AppealRelationship.receiptMethod,
AppealRelationship.emergencyCode,
AppealRelationship.continueBenefitsIndicator,
AppealRelationship.comments,
AppealRelationship.appealedDecisionDate,
AppealRelationship.versionNo
INTO
:caseID,
:priorAppealCaseID,
:caseReference,
:priorAppealCaseReference,
:receivedDate,
:reasonCode,
:receiptMethod,
:emergencyCode,
:continueBenefitsIndicator,
:comments,
:appealedDecisionDate,
:versionNo
FROM
(CaseHeader AppealedCase INNER JOIN
AppealRelationship
ON AppealedCase.caseID = AppealRelationship.caseID)
LEFT
JOIN
CaseHeader
ON AppealRelationship.priorAppealCaseID = CaseHeader.caseID
WHERE AppealRelationship.appealRelationshipID = :appealRelationshipID
|