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