码迷,mamicode.com
首页 > 其他好文 > 详细

Accounting Calendar template

时间:2018-06-25 01:12:32      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:order   rom   tcap   ||   tps   分享图片   title   info   top   

技术分享图片

SELECT INITCAP (TO_CHAR (TO_DATE (&year || ‘-‘ || LPAD (ROWNUM, 2, ‘0‘), ‘yyyy-mm‘), ‘MON‘, ‘NLS_DATE_LANGUAGE=AMERICAN‘)) prefix

, ‘Month‘ TYPE

, TO_CHAR (&year) year

, TO_CHAR (TO_DATE (&year || ‘-‘ || LPAD (ROWNUM, 2, ‘0‘), ‘yyyy-mm‘), ‘q‘) quarter

, TO_CHAR (ROWNUM) num

, UPPER (TO_CHAR (TO_DATE (&year || ‘-‘ || LPAD (ROWNUM, 2, ‘0‘), ‘yyyy-mm‘), ‘dd-mon-yyyy‘)) date_from

, UPPER (TO_CHAR (LAST_DAY (TO_DATE (&year || ‘-‘ || LPAD (ROWNUM, 2, ‘0‘), ‘yyyy-mm‘)), ‘dd-mon-yyyy‘)) date_to

, INITCAP (TO_CHAR (TO_DATE (&year || ‘-‘ || LPAD (ROWNUM, 2, ‘0‘), ‘yyyy-mm‘), ‘mon-yy‘)) name

FROM DUAL

CONNECT BY LEVEL <= 12

UNION ALL

SELECT ‘Adj‘ prefix

, ‘Month‘ TYPE

, TO_CHAR (&year) year

, ‘4‘ quarter

, ‘13‘ num

, UPPER (TO_CHAR (LAST_DAY (TO_DATE (&year || ‘-12‘, ‘yyyy-mm‘)), ‘dd-mon-yyyy‘)) date_from

, UPPER (TO_CHAR (LAST_DAY (TO_DATE (&year || ‘-12‘, ‘yyyy-mm‘)), ‘dd-mon-yyyy‘)) date_to

, ‘Adj-‘ || TO_CHAR (TO_DATE (&year, ‘yyyy‘), ‘yy‘) name

FROM DUAL;

Accounting Calendar template

标签:order   rom   tcap   ||   tps   分享图片   title   info   top   

原文地址:https://www.cnblogs.com/quanweiru/p/9222286.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!