SELECT
ta.taskAssignmentID,
ta.taskID,
ta.relatedID,
ta.assigneeType,
ta.relatedName,
tr.fromUserName,
tr.toUserName,
tr.toRedirectID,
tr.toRedirectType
INTO
:taskAssignmentID,
:taskID,
:relatedID,
:assigneeType,
:relatedName,
:fromUserName,
:toUserName,
:toRedirectID,
:toRedirectType
FROM
TaskRedirection tr,
TaskAssignment ta
WHERE
(
ta.relatedName = tr.fromUserName
)
AND
(
tr.startDateTime <= :currentDateTime
AND
(
tr.endDateTime IS NULL
OR tr.endDateTime >= :currentDateTime
)
)
AND tr.blockTaskAllocation = '0'
ORDER BY tr.fromUserName
|