select tbl.noticeno, tbl.subject, tbl.contents, tbl.writedate
from (select
a.noticeno, a.subject, a.contents,
substring(a.writedate,1,4)+'-'+substring(a.writedate,5,2)+'-'+substring(a.writedate,7,2) writedate
from TC_NOTICE a where 1=1
and a.NOTICETYPE IN('1','2','3','4','5','6')
ORDER BY writedate DESC
) tbl
where rownum <= 3
이게 오라클 쿼리고여
select tbl.noticeno, tbl.subject, tbl.contents, tbl.writedate
from (select
a.noticeno, a.subject, a.contents,
substring(a.writedate,1,4)+'-'+substring(a.writedate,5,2)+'-'+substring(a.writedate,7,2) writedate
from TC_NOTICE a where 1=1
and a.NOTICETYPE IN('1','2','3','4','5','6')
//ORDER BY writedate DESC
) tbl
//where rownum <= 3
주석 막고 하면 실행은 되는데
주석 처리 한거까지 적용 시켜서 하려면 어떻게 변환 해야 하나요???
|