Operation Details
Description: Retrieves&nbsp;most&nbsp;recent&nbsp;business&nbsp;object&nbsp;change&nbsp;list for the status code specified.&nbsp;In&nbsp;most&nbsp;cases&nbsp;it&nbsp;will&nbsp;return&nbsp;just&nbsp;a&nbsp;single&nbsp;record.&nbsp;In&nbsp;some&nbsp;instances<br /> (for&nbsp;example&nbsp;when&nbsp;there&nbsp;are&nbsp;a&nbsp;few&nbsp;records&nbsp;in&nbsp;succession,&nbsp;and&nbsp;their&nbsp;changes&nbsp;are&nbsp;applied&nbsp;at&nbsp;the&nbsp;same&nbsp;time)&nbsp;it&nbsp;may&nbsp;return&nbsp;a<br /> few&nbsp;records.
Sterotype: nsmulti
SQL
SELECT 
EVIDENCECHANGEHISTORY.EVIDENCEDESCRIPTORID, 
EVIDENCECHANGEHISTORY.CHANGEUSER,
EVIDENCECHANGEHISTORY.CHANGEDATETIME,
EVIDENCEDESCRIPTOR.STATUSCODE,
EVIDENCEDESCRIPTOR.PENDINGREMOVALIND
INTO 
:evidenceDescriptorID, 
:changeUser,
:changeDateTime,
:statusCode,
:pendingRemovalInd
FROM 
EVIDENCECHANGEHISTORY,
EVIDENCEDESCRIPTOR
WHERE 
EVIDENCECHANGEHISTORY.CHANGEDATETIME = 
  (SELECT 
  MAX(CHANGEDATETIME) 
  FROM 
  EVIDENCECHANGEHISTORY  
  WHERE 
  EVIDENCECHANGEHISTORY.EVIDENCEDESCRIPTORID IN 
    (SELECT 
    EVIDENCEDESCRIPTORID 
    FROM 
    EVIDENCEDESCRIPTOR 
    WHERE 
    SUCCESSIONID = :successionID AND
    STATUSCODE = :statusCode)) AND
EVIDENCECHANGEHISTORY.EVIDENCEDESCRIPTORID = EVIDENCEDESCRIPTOR.EVIDENCEDESCRIPTORID AND
EVIDENCEDESCRIPTOR.SUCCESSIONID = :successionID AND
EVIDENCEDESCRIPTOR.STATUSCODE = :statusCode