일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Google Map
- jQuery
- PHP
- Ajax
- sencha touch
- PLSQL
- WebLogic
- GPS
- node.js
- MySQL
- tomcat
- dock
- swingx
- JDOM
- jsr 296
- appspresso
- 전자정부프레임워크
- oracle
- phonegap
- rowspan
- MFC
- Spring
- iBATIS
- Android
- 선택적조인
- Eclipse
- JSON
- 가우스
- Struts
- ibsheet
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
;