2008.06.25 10:56
SELECT *
  FROM USER_TRIGGERS
신고
Posted by 커피한잔의여유
2008.06.25 10:05
SELECT TRUNC (MONTHS_BETWEEN (SYSDATE, TO_DATE (:HAPPYDAY, 'YYYYMMDD')) / 12) "년"
     , TRUNC (  MONTHS_BETWEEN (SYSDATE, TO_DATE (:HAPPYDAY, 'YYYYMMDD'))
              - TRUNC (MONTHS_BETWEEN (SYSDATE, TO_DATE (:HAPPYDAY, 'YYYYMMDD')) / 12) * 12
             ) "개월"
     , TRUNC (  (  MONTHS_BETWEEN (SYSDATE, TO_DATE (:HAPPYDAY, 'YYYYMMDD'))
                 - TRUNC (MONTHS_BETWEEN (SYSDATE, TO_DATE (:HAPPYDAY, 'YYYYMMDD')))
                )
              * 30.5
             ) "일"
  FROM DUAL;
신고
Posted by 커피한잔의여유
2008.06.24 10:05
SELECT     SUM (DECODE (TO_CHAR (TO_DATE ('200806' || LPAD (LEVEL, 2, '0'), 'YYYYMMDD'), 'D')
                      , '1', 1
                      , 0
                       )
               ) DATE#
      FROM DUAL
CONNECT BY TO_DATE ('200806', 'YYYY-MM') + LEVEL - 1 <= LAST_DAY (TO_DATE ('200806', 'YYYY-MM'))
신고
Posted by 커피한잔의여유

티스토리 툴바