Database SQL Operation: ISPSpendDown.readClosedProgramLatestEndDate
Description: | Searches existing programs of type "closed" on the Integrated Case, except those of type "Cost Sharing". Returns the latest end date.
|
Sterotype: | ns |
SELECT
CaseHeader.endDate
INTO
:endDate
FROM
CaseHeader,
ProductDelivery
WHERE CaseHeader.integratedCaseID = :caseID
AND CaseHeader.caseID = ProductDelivery.caseID
AND ProductDelivery.productID <> :productID1
AND ProductDelivery.productID <> :productID2
AND CaseHeader.statusCode = :statusCode
AND CaseHeader.endDate = (
SELECT
MAX(endDate)
FROM
CaseHeader
)
|