Operation Details
Description: counts the work queue subscriptions based on username or subscriber ID , type and work queue ID
Sterotype: ns
SQL
SELECT
  COUNT (*)
INTO
  :numberOfRecords 
FROM
  WorkQueueSubscription wq 
WHERE wq.subscriberType = :subscriberType 
  AND 
  (
    :searchBySubscriberIDInd = '0' 
    OR wq.subscriberID = :subscriberID 
  ) 
  AND 
  (
    :userName IS NULL 
    OR wq.userName = :userName 
  ) 
  AND wq.workQueueID = :workQueueID