Operation Details
Description: Reads case status and Met indicator of the last spend down period for the case.
Sterotype: ns
SQL
SELECT
  ISPSpendDown.metInd,
  CaseHeader.statusCode
INTO
  :metInd,
  :statusCode 
FROM
  CaseHeader,
  ISPSpendDown 
WHERE CaseHeader.caseID = :caseID 
  AND ISPSpendDown.caseID = :caseID 
  AND ISPSpendDown.statusCode = :statusCode 
  AND ISPSpendDown.endDate = ( 
  SELECT
    MAX(endDate) 
  FROM
    ISPSpendDown 
  )