Operation Details
Description: Reads the CaseEvidenceTree entity by statusCode, effectiveFrom date and caseID.
Sterotype: ns
SQL
SELECT
  caseEvidenceTreeID,
  caseID,
  effectiveFrom,
  statusCode,
  previousEvidenceID,
  versionNo
INTO
  :caseEvidenceTreeID,
  :caseID,
  :effectiveFrom,
  :statusCode,
  :previousEvidenceID,
  :versionNo 
FROM
  CaseEvidenceTree 
WHERE CaseEvidenceTree.caseID = :caseID 
  AND CaseEvidenceTree.statusCode = :statusCode 
  AND 
  (
    
    (
      CaseEvidenceTree.effectiveFrom = :effectiveFrom 
      AND :useDateInd <> '0' 
    ) 
    OR 
    (
      CaseEvidenceTree.effectiveFrom IS NULL 
      AND :useDateInd = '0' 
    ) 
    
  )