일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- MySQL
- 선택적조인
- Ajax
- Eclipse
- WebLogic
- node.js
- jQuery
- tomcat
- sencha touch
- 가우스
- PLSQL
- PHP
- oracle
- phonegap
- iBATIS
- 전자정부프레임워크
- JDOM
- rowspan
- MFC
- Struts
- Google Map
- ibsheet
- Android
- appspresso
- Spring
- jsr 296
- GPS
- dock
- JSON
- swingx
Archives
- Today
- Total
Where The Streets Have No Name
구간에 존재하는 날짜 구하기 본문
현재달의 날짜전부
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(last_day(sysdate),'dd')))
오늘날짜부터 이달의 1일까지
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(sysdate,'dd')))
내일부터 이달말일까지
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(last_day(sysdate),'dd')))
minus
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(sysdate,'dd')))
이번달부터 정해진 기간까지
select to_char(add_months(sysdate,n),'yyyymm')
from
(select rownum-1 as n
from dual
connect by level <= :p_range)
시작월부터 정해진 기간의 월을 구함
select to_char(add_months(to_date(:p_start_month,'yyyymm'),level-1),'yyyymm') as yyyymm
from dual
connect by level <= :p_month_range
시작월부터 종료월의 월을 구함
select to_char(add_months(to_date(:p_start_month,'yyyymm'),level-1),'yyyymm') as yyyymm
from dual
connect by level <= months_between(to_date(:p_end_month,'yyyymm'),to_date(:p_start_month,'yyyymm')) + 1
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(last_day(sysdate),'dd')))
오늘날짜부터 이달의 1일까지
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(sysdate,'dd')))
내일부터 이달말일까지
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(last_day(sysdate),'dd')))
minus
select trunc(sysdate,'month') + n
from(select rownum-1 n
from dual
connect by level <= to_number(to_char(sysdate,'dd')))
이번달부터 정해진 기간까지
select to_char(add_months(sysdate,n),'yyyymm')
from
(select rownum-1 as n
from dual
connect by level <= :p_range)
시작월부터 정해진 기간의 월을 구함
select to_char(add_months(to_date(:p_start_month,'yyyymm'),level-1),'yyyymm') as yyyymm
from dual
connect by level <= :p_month_range
시작월부터 종료월의 월을 구함
select to_char(add_months(to_date(:p_start_month,'yyyymm'),level-1),'yyyymm') as yyyymm
from dual
connect by level <= months_between(to_date(:p_end_month,'yyyymm'),to_date(:p_start_month,'yyyymm')) + 1