Operation Details
Description: Returns a count of CaseUserRole records for specified participantRoleID and caseID and typeCode.
Sterotype: ns
SQL
SELECT
  COUNT(*)
INTO
  :numberOfRecords 
FROM
  CaseParticipantRole 
WHERE caseID = :caseID 
  AND recordStatus = :recordStatus 
  AND participantRoleID = :participantRoleID 
  AND typeCode = :typeCode 
  AND 
  (
    
    (
      toDate >= :fromDate 
      OR toDate IS NULL 
    ) 
    AND 
    (
      fromDate <= :toDate 
      OR :toDate IS NULL 
    ) 
  )