views:

266

answers:

2
+4  A: 
SELECT
    CASE
        WHEN StartDate = BookedDate AND StartTime BETWEEN TimeSlotStart and TimeSlotEnd
            THEN 'True'
        ELSE 'False'
    END
FROM
    ...
gbn
A: 

Why not simply:

WHERE Startdate = BookedDate AND StartTime <= TimeSlotEnd AND StartTime >= TimeSlotStart

?

bortzmeyer