Database SQL Operation: TaskAssignment.searchUnreservedByRelatedNamePriorityAndLongestAssignedDateTime
Description: | Returns the identifiers of the tasks assigned to the specified user filtered by priority and which have been assigned to that object for longest period of time. |
Sterotype: | nsmulti |
SELECT
t.taskID,
t.versionNo
INTO
:taskID,
:versionNo
FROM
TaskAssignment ta,
Task t
WHERE
ta.relatedName = :relatedName
AND ta.assigneeType = :assigneeType
AND t.priority = :priority
AND ta.taskID = t.taskID
AND t.reservedBy IS NULL
ORDER BY t.priority ASC,
t.assignedDateTime ASC
|