SELECT EV_DATE,VAL
FROM
(
SELECT TO_DATE('20160801','YYYYMMDD') AS SDATE, 2 AS VAL FROM DUAL
UNION ALL
SELECT TO_DATE('20160811','YYYYMMDD') AS SDATE, 8 FROM DUAL
UNION ALL
SELECT TO_DATE('20160819','YYYYMMDD') AS SDATE, 7 FROM DUAL
) A,
(
SELECT TRUNC(TO_DATE('20160801','YYYYMMDD') ) + LEVEL-1 AS EV_DATE
FROM DUAL CONNECT BY LEVEL <= 31
) B
WHERE B.EV_DATE = A.SDATE(+)
ORDER BY EV_DATE
아래와 같이 A테이블에 입력된 값을 다음 값이 나오기 전까지 모두 채워 줄수 있나요?
20160801 , 2
20160802 , 2
20160803 , 2
...
...
...
20160811 , 8
...
...
...
20160819 , 7
...
...
20160831 , 7
|