All pastes #411124 Raw Edit

Someone

public text v1 · immutable
#411124 ·published 2007-03-26 21:17 UTC
rendered paste body
SELECT restaurant.restaurant_id FROM schedule JOIN hours  ON schedule.hours_id = hours.hours_id JOIN restaurant ON restaurant.restaurant_id = schedule.restaurant_id WHERE weekday = (DATEPART(dw, GETDATE())-1) AND DATEPART(hh, GETDATE()) - DATEPART(hh, first_pickup) = replace (time_zone, 'Eastern Time', -1) replace(time_zone, 'Central Time', -2)