SELECT
t.taskID,
t.priority,
t.assignedDateTime,
t.restartTime,
t.wdoSnapshot,
t.overflowInd,
t.versionNo,
w.deadlineTime
INTO
:taskID,
:taskPriority,
:reservedDateTime,
:restartDateTime,
:wdoSnapshot,
:overflowInd,
:versionNo,
:taskDeadlineDateTime
FROM
Task t,
WorkflowDeadline w,
TaskAssignment ta
WHERE t.taskID = w.taskID
AND t.taskID = ta.taskID
AND
(
:searchByRelatedIDInd = '0'
OR ta.relatedID = :relatedID
)
AND
(
:relatedName IS NULL
OR ta.relatedName = :relatedName
)
AND assigneeType = :assigneeType
AND w.deadlineTime >= :fromDeadlineDateTime
AND w.deadlineTime < :toDeadlineDateTime
AND t.reservedBy = :reservedBy
AND t.status = :status
ORDER BY t.assignedDateTime ASC
|