SELECT
WaitListEntry.waitListEntryID,
WaitListEntry.waitListID,
WaitListEntry.caseParticipantRoleID,
WaitListEntry.position,
WaitListEntry.priority,
WaitListEntry.expiryDate,
WaitListEntry.removalReason,
WaitListEntry.status,
WaitListEntry.reviewDate,
WaitListEntry.comments,
WaitListEntry.versionNo,
WaitList.type,
WaitList.resourceID,
WaitList.createdDateTime,
CaseHeader.caseID,
CaseHeader.caseReference,
CaseHeader.caseTypeCode
INTO
:waitListEntryID,
:waitListID,
:caseParticipantRoleID,
:position,
:priority,
:expiryDate,
:removalReason,
:status,
:reviewDate,
:comments,
:versionNo,
:type,
:resourceID,
:createdDateTime,
:caseID,
:caseReference,
:caseTypeCode
FROM
WaitListEntry,
WaitList,
CaseHeader,
CaseParticipantRole
WHERE
WaitListEntry.status = :status
AND
WaitListEntry.waitListID=WaitList.waitListID
AND
WaitListEntry.caseParticipantRoleID = CaseParticipantRole.caseParticipantRoleID
AND
CaseParticipantRole.caseID=CaseHeader.caseID
AND
CaseParticipantRole.participantRoleID = :concernRoleID
|