Database SQL Operation: EvidenceDescriptor.searchMostRecentBusinessObjectChanges
Description: | Retrieves most recent business object change list. In most cases it will return just a single record. In some instances
(for example when there are a few records in succession, and their changes are applied at the same time) it may return a
few records. |
Sterotype: | nsmulti |
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
EVIDENCECHANGEHISTORY.EVIDENCEDESCRIPTORID = EVIDENCEDESCRIPTOR.EVIDENCEDESCRIPTORID AND
EVIDENCEDESCRIPTOR.SUCCESSIONID = :successionID
|