Operation Details
Description: Counts work queue subscriptions by user or subscriber.
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