Database SQL Operation: AppealRelationship.searchActiveAppealByCaseAndAppealType
Description: | Determine if the appealed case and type combination is already on an active appeal case. |
Sterotype: | nsmulti |
SELECT
appealCaseID
INTO
:appealCaseID
FROM
AppealRelationship,
Appeal,
CaseHeader
WHERE AppealRelationship.caseID = :caseID
AND appealCaseID = Appeal.caseID
AND Appeal.appealTypeCode = :appealTypeCode
AND appealCaseID = CaseHeader.caseID
AND
(
CaseHeader.statusCode = :activeStatusCode
OR CaseHeader.statusCode = :openStatusCode
OR CaseHeader.statusCode = :approvedStatusCode
)
|