Operation Details
Description: Retrieves details on all tasks the have been assigned to a an organizational object and have been reserved.
Sterotype: nsmulti
SQL
SELECT
  t.reservedBy,
  t.status,
  u.fullName
INTO
  :reservedBy,
  :status,
  :userFullName 
FROM
  TaskAssignment ta,
  Task t 
  
  LEFT OUTER JOIN
  
  Users u 
  ON (t.reservedBy = u.userName) 
WHERE t.taskID = ta.taskID 
  AND 
  (
    :searchByRelatedIDInd = '0' 
    OR ta.relatedID = :relatedID 
  ) 
  AND 
  (
    :relatedName IS NULL 
    OR ta.relatedName = :relatedName 
  ) 
  AND ta.assigneeType = :assigneeType 
  AND t.reservedBy IS NOT NULL 
ORDER BY t.reservedBy