SELECT
DISTINCT cr.concernRoleID,
cr.concernRoleName,
cpr.caseParticipantRoleID,
cpr.caseID,
cpr.typeCode,
cpr.recordStatus
INTO
:concernRoleID,
:concernRoleName,
:caseParticipantRoleID,
:caseID,
:typeCode,
:recordStatus
FROM
CaseParticipantRole cpr,
ConcernRole cr,
CaseHeader ch,
PlannedSubGoal psg,
PlannedGoal pg
WHERE psg.plannedSubGoalID = :plannedSubGoalID
AND psg.plannedGoalID = pg.plannedGoalID
AND pg.caseID = ch.caseID
AND ch.caseID = cpr.caseID
AND cpr.participantRoleID = cr.concernRoleID
ORDER BY cr.concernRoleName
|