Operation Details
Description: Provides the name of a person who is participated behalf of a case participant.
Sterotype: ns
SQL
SELECT
  CaseParticipantRoleLink.caseparticipantroleid,
  concernrole.concernrolename
INTO
  :caseParticipantRoleID,
  :name 
FROM
  CaseParticipantRoleLink,
  concernrole,
  caseparticipantrole 
WHERE caseparticipantrole.CASEPARTICIPANTROLEID =CaseParticipantRoleLink.CASEPARTICIPANTROLEID 
  AND concernrole.concernroleid =caseparticipantrole.PARTICIPANTROLEID 
  AND 
  (
    CaseParticipantRoleLink.RELATEDID = 
    ( 
    SELECT
      hearingwitnessid 
    FROM
      hearingwitness 
    WHERE caseparticipantroleid = :caseParticipantRoleID 
    ) 
    OR CaseParticipantRoleLink.RELATEDID = 
    ( 
    SELECT
      hearingrepresentativeid 
    FROM
      HearingRepresentative 
    WHERE caseparticipantroleid = :caseParticipantRoleID 
    ) 
  )