SELECT
transferApplicationID,
applicationID,
fromCaseID,
toCaseID,
transferDateTime,
transferStatus,
undoTransferAvailableInd,
userName
INTO
:transferApplicationID,
:applicationID,
:fromCaseID,
:toCaseID,
:transferDateTime,
:transferStatus,
:undoTransferAvailableInd,
:userName
FROM
TransferredApplication
WHERE
TransferredApplication.applicationID = :applicationID
AND
(
transferDateTime = (SELECT MAX(transferDateTime)
FROM TransferredApplication T2
WHERE TransferredApplication.applicationID = T2.applicationID)
)
|