Database SQL Operation: TaskAssignment.searchUnreservedByRelatedNameNullPriorityAndLongestAssignedDateTime
Description: | Returns the identifiers of the tasks assigned to a specified user with a null priority and which have been assigned to that user 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 ta.taskID = t.taskID
AND t.reservedBy IS NULL
AND t.priority IS NULL
ORDER BY
t.assignedDateTime ASC
|