日期:2014-05-17 浏览次数:20894 次
WITH sj AS
(SELECT TO_CHAR(S_DT + (ROWNUM - 1) * 1 / 1440, 'hh24:mi') dd
FROM (SELECT TO_DATE('00:00', 'hh24:mi') S_DT,
TO_DATE('23:59', 'hh24:mi') E_DT
FROM DUAL) T
CONNECT BY S_DT + (ROWNUM - 1) * 1 / 1440 <= E_DT)
SELECT COUNT(1) FROM sj WHERE
not(dd>'08:00' AND dd<'09:00') AND
not(dd>'10:00' AND dd<'10:30') AND
not(dd>'10:10' AND dd<'11:20')