Operation Details
Description: Returns case relationship details.
Sterotype: ns
SQL
SELECT
  CaseRelationship.caseID,
  CaseRelationship.relatedCaseID,
  CaseRelationship.startDate,
  CaseRelationship.endDate,
  CaseRelationship.statusCode,
  CaseRelationship.typeCode,
  CaseRelationship.reasonCode,
  CaseRelationship.caseRelationshipID,
  CaseRelationship.comments,
  CaseRelationship.versionNo,
  CH1.caseReference,
  CH2.caseReference
INTO
  :caseID,
  :relatedCaseID,
  :startDate,
  :endDate,
  :statusCode,
  :typeCode,
  :reasonCode,
  :caseRelationshipID,
  :comments,
  :versionNo,
  :caseReference,
  :relatedCaseReference 
FROM
  CaseRelationship,
  CaseHeader CH1,
  CaseHeader CH2 
WHERE CaseRelationship.caseRelationshipID = :caseRelationshipID 
  AND CH1.caseID = CaseRelationship.caseID 
  AND CH2.caseID = CaseRelationship.relatedCaseID