SELECT
slotID,
scheduleID,
name,
startTime,
endTime,
recordStatus,
comments,
maxWorkUnits,
versionNo,
startDate,
endDate,
frequencyPattern
INTO
:slotID,
:scheduleID,
:name,
:startTime,
:endTime,
:recordStatus,
:comments,
:maxWorkUnits,
:versionNo,
:startDate,
:endDate,
:frequencyPattern
FROM
Slot
WHERE scheduleID = :scheduleID
AND recordStatus = :recordStatus
AND
(
startTime = :startTime
OR endTime = :endTime
OR
(
startTime < :endTime
AND endTime > :startTime
)
)
AND
(
startDate = :startDate
OR startDate IS NULL
)
AND
(
endDate = :endDate
OR endDate IS NULL
)
AND
(
frequencyPattern = :frequencyPattern
OR frequencyPattern IS NULL
)
|