Operation Details
Description: Returns the earliest deadline date for all of the active and approved AppealRelationship records for an appeal case. Can return more than one record when deadline dates are the same.
Sterotype: nsmulti
SQL
SELECT
  caseID,
  deadlineDate
INTO
  :caseID,
  :deadlineDate 
FROM
  AppealRelationship 
WHERE deadlineDate IN 
  ( 
  SELECT
    MIN(deadlineDate) 
  FROM
    AppealRelationship 
  WHERE appealCaseID = :appealCaseID 
    AND statusCode = :statusCode 
    AND recordStatus = :recordStatus 
  ) 
  AND appealCaseID = :appealCaseID 
  AND statusCode = :statusCode 
  AND recordStatus = :recordStatus