Operation Details
Description: Method gets the latest Reassessment Cover Period To date.
Sterotype: ns
SQL
SELECT
  nomPmt.coverPeriodTo
INTO
  :date 
FROM
  OverUnderPaymentHeader oupHdr,
  NomineeOverUnderPayment nomPmt 
WHERE oupHdr.caseID = :caseID 
  AND oupHdr.reassessmentDate = 
  ( 
  SELECT
    MAX(reassessmentDate) 
  FROM
    OverUnderPaymentHeader 
  WHERE caseID = :caseID 
  ) 
  AND oupHdr.overUnderPaymentHeaderID = nomPmt.overUnderPaymentHeaderID 
  AND nomPmt.coverPeriodTo = 
  ( 
  SELECT
    MAX(nomPmt2.coverPeriodTo) 
  FROM
    OverUnderPaymentHeader oupHdr2,
    NomineeOverUnderPayment nomPmt2 
  WHERE oupHdr2.caseID = :caseID 
    AND oupHdr2.overUnderPaymentHeaderID = nomPmt2.overUnderPaymentHeaderID 
  )