Operation Details
Description: Count entries that match this one based on userName, estimatedCost, statusCode, have a null plan item ID, and which do not match the provided unique ID. Essentially this is checking for duplicates of an entry that is about to be modified.
Sterotype: ns
SQL
SELECT
  COUNT (*)
INTO
  :recordCount 
FROM
  PlanItemApprovalCheck 
WHERE planItemApprovalCheckID <> :planItemApprovalCheckID 
  AND planItemID is NULL 
  AND estimatedCost = :estimatedCost 
  AND statusCode = :statusCode 
  AND userName = :userName