Database SQL Operation: CaseApprovalCheck.readUserCheckForEstCost
Description: | Returns the percentage and estimated cost for a user case approval check with the lowest estimated cost. |
Sterotype: | ns |
SELECT
percentage,
estimatedCost
INTO
:percentage,
:estimatedCost
FROM
CaseApprovalCheck
WHERE estimatedCost =
(
SELECT
MIN(estimatedCost)
FROM
CaseApprovalCheck
WHERE estimatedCost > :estimatedCost
AND typeCode = :typeCode
AND userName = :userName
AND statusCode = :statusCode
)
AND typeCode = :typeCode
AND userName = :userName
AND statusCode = :statusCode
|