Operation Details
Description: Count entries that match this one based on userName, estimatedCost, statusCode, have a null 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 is NULL 
  AND estimatedCost = :estimatedCost 
  AND statusCode = :statusCode 
  AND userName = :userName