Operation Details
Description: Returns the number of slots for a given schedule date and schedule type.
Sterotype: ns
SQL
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 = :locationScheduleType
  AND DailySchedule.recordStatus = :status  
 )
 AND Dailyschedule.type = :locationScheduleType
 AND DailySchedule.locationID = :locationID
 AND DailySchedule.recordStatus = :status
) 
AND Slot.locationID = :locationID 
AND Slot.recordStatus = :status