Operation Details
Description: Returns a list of HCRCOCStatusHistory records by searching across HCRCoCStatus and HCRCoCStatusHistory and order by date/time descending so that the history appears in reverse chronological order
Sterotype: nsmulti
SQL
SELECT
  HCRCOCStatusHistory.historyID,
  HCRCOCStatusHistory.afterStatus,
  HCRCOCStatusHistory.beforeStatus,
  HCRCOCStatusHistory.hcrCoCStatusID,
  HCRCOCStatusHistory.timestamp,
  HCRCOCStatusHistory.userName

INTO
 :historyID,
 :afterStatus,
 :beforeStatus,
 :hcrCoCStatusID,
 :timestamp,
 :userName

FROM
  HCRCOCStatusHistory,
  HCRCOcStatus
  
WHERE
  HCRCOCStatus.lifeEventID = :lifeEventID AND
  HCRCOCStatusHistory.hcrCoCStatusID = HCRCOCStatus.hcrCoCStatusID

ORDER BY 
  HCRCOCStatusHistory.timeStamp DESC