일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- PHP
- GPS
- Android
- oracle
- node.js
- Ajax
- swingx
- sencha touch
- 전자정부프레임워크
- JSON
- WebLogic
- rowspan
- MFC
- Google Map
- Struts
- phonegap
- jsr 296
- Eclipse
- 가우스
- PLSQL
- appspresso
- MySQL
- JDOM
- 선택적조인
- dock
- iBATIS
- jQuery
- tomcat
- Spring
- ibsheet
Archives
- Today
- Total
Where The Streets Have No Name
선택적 복제 본문
jikgub_cd를 3으로 나누어서 나머지에 따라서 복제가 일어나게끔...
1 => 1개복제
2 => 2개복제
0 => 3개복제
SELECT MOD (TO_NUMBER (A.JIKGUB_CD), 3) AS COPY_CNT, B.RN,
A.*
FROM ORG201 A,
(SELECT ROWNUM AS RN
FROM DUAL
CONNECT BY LEVEL <= 3) B
WHERE '20080205' BETWEEN SDATE AND EDATE
AND B.RN BETWEEN 1
AND DECODE (MOD (TO_NUMBER (A.JIKGUB_CD), 3),
0, 3,
MOD (TO_NUMBER (A.JIKGUB_CD), 3)
;