Operation Details
Description: Count entries that match this one based on userName, estimatedCost, statusCode, servicePlanGroupID 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
  ServicePlanGroupApprovalCheck 
WHERE servicePlanGroupApprovalChkID <> :servicePlanGroupApprovalChkID 
  AND servicePlanGroupID = :servicePlanGroupID 
  AND estimatedCost = :estimatedCost 
  AND statusCode = :statusCode 
  AND userName = :userName