SELECT
CaseHeader.caseReference,
CaseHeader.caseID,
CaseHeader.caseTypeCode,
CaseHeader.concernRoleID,
CaseHeader.startDate,
CaseHeader.statusCode,
ConcernRole.concernRoleName,
ConcernRole.concernRoleType,
UserRecentAction.actionDateTime,
UserRecentAction.userName,
OrgObjectLink.orgObjectType
INTO
:caseReference,
:caseID,
:caseTypeCode,
:concernRoleID,
:startDate,
:statusCode,
:concernRoleName,
:concernRoleType,
:actionDateTime,
:ownerName,
:ownerType
FROM
UserRecentAction,
ConcernRole,
CaseHeader,
OrgObjectLink
WHERE UserRecentAction.userName = :userName
AND UserRecentAction.type = :type
AND UserRecentAction.actionType = :actionType
AND UserRecentAction.referenceNo = CaseHeader.caseID
AND ConcernRole.concernRoleID = CaseHeader.concernRoleID
AND CaseHeader.ownerOrgObjectLinkID = OrgObjectLink.orgObjectLinkID
ORDER BY CaseHeader.startDate ASC
|