Operation Details
Description: Returns the percentage and estimated cost for a product approval check with the lowest estimated cost.
Sterotype: ns
SQL
SELECT
  percentage,
  estimatedCost
INTO
  :percentage,
  :estimatedCost 
FROM
  CaseApprovalCheck 
WHERE estimatedCost = 
  ( 
  SELECT
    MIN(estimatedCost) 
  FROM
    CaseApprovalCheck 
  WHERE estimatedCost > :estimatedCost 
    AND typeCode = :typeCode 
    AND productID = :productID 
    AND statusCode = :statusCode 
  ) 
  AND typeCode = :typeCode 
  AND productID = :productID 
  AND statusCode = :statusCode