일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- JSON
- jsr 296
- MFC
- 전자정부프레임워크
- Google Map
- appspresso
- JDOM
- jQuery
- PHP
- swingx
- rowspan
- oracle
- phonegap
- Spring
- 선택적조인
- MySQL
- Struts
- PLSQL
- iBATIS
- node.js
- Android
- WebLogic
- tomcat
- Ajax
- sencha touch
- ibsheet
- dock
- 가우스
- Eclipse
- GPS
Archives
- Today
- Total
Where The Streets Have No Name
구간데이터를 단위별로 나열해서 보여주기 본문
with tmp as
(select 'a' as id,
to_date('200305021120', 'yyyymmddhh24mi') as sdate,
to_date('200305021300', 'yyyymmddhh24mi') as edate
from dual
union
select 'b' as id,
to_date('200305021300', 'yyyymmddhh24mi') as sdate,
to_date('200305021400', 'yyyymmddhh24mi') as edate
from dual)
select *
from (select to_date('200305020000', 'yyyymmddhh24mi') +
(level - 1) * 0.5 / 24 as s,
to_date('200305020000', 'yyyymmddhh24mi') + level * 0.5 / 24 as e
from dual
connect by level <= 24 * 2) a,
tmp b
where a.s < b.edate
and b.sdate < a.e
;