Database SQL Operation: Slot.countAppealSlotsByLocationDateAndScheduleType
Description: | Returns the number of slots for a given schedule date and schedule type. |
Sterotype: | ns |
SELECT
count(*)
INTO
:count
FROM
Slot
WHERE Slot.scheduleID =
(
SELECT
scheduleID
FROM
DailySchedule
WHERE DailySchedule.effectiveDate =
(
SELECT
MAX(DailySchedule.effectiveDate)
FROM
DailySchedule
WHERE DailySchedule.locationID = :locationID
AND (DailySchedule.type is null OR Dailyschedule.type = :locationScheduleType)
AND DailySchedule.recordStatus = :status
)
AND (DailySchedule.type is null OR Dailyschedule.type = :locationScheduleType)
AND DailySchedule.locationID = :locationID
AND DailySchedule.recordStatus = :status
)
AND Slot.locationID = :locationID
AND Slot.recordStatus = :status
|