SELECT
CaseHeader.caseID,
CaseHeader.caseReference,
CaseHeader.caseTypeCode,
CaseHeader.startDate,
CaseHeader.statusCode,
ConcernRole.concernRoleID,
ConcernRole.concernRoleName,
ConcernRole.concernRoleType
INTO
:caseID,
:caseReference,
:caseTypeCode,
:startDate,
:statusCode,
:concernRoleID,
:concernRoleName,
:concernRoleType
FROM
CaseHeader,
ConcernRole
WHERE CaseHeader.integratedCaseID = :caseID
AND
(
CaseHeader.caseTypeCode = :caseTypeCode
OR :caseTypeCode IS NULL
)
AND ConcernRole.concernRoleID = CaseHeader.concernRoleID
|