17,089
社区成员
发帖
与我相关
我的任务
分享
SELECT empno, ename,
TO_CHAR(hiredate,'YYYY-MM-DD') hiredate,
trunc(to_char(hiredate,'mm')*3/10)+1) "In_Season"
FROM emp;
scott@ORCL10G> select hiredate,'该员工是:'||to_char(hiredate,'YYYY')||'年'||'第 '||
2 to_char(trunc(to_char(hiredate,'mm')*3/10)+1)||'季度 入厂工作的' as "入厂季度" from emp;
HIREDATE 入厂季度
-------------- --------------------------------------------------------------------------
17-12月-80 该员工是:1980年第 4季度 入厂工作的
20-2月 -81 该员工是:1981年第 1季度 入厂工作的
22-2月 -81 该员工是:1981年第 1季度 入厂工作的
02-4月 -81 该员工是:1981年第 2季度 入厂工作的
28-9月 -81 该员工是:1981年第 3季度 入厂工作的
01-5月 -81 该员工是:1981年第 2季度 入厂工作的
09-6月 -81 该员工是:1981年第 2季度 入厂工作的
19-4月 -87 该员工是:1987年第 2季度 入厂工作的
17-11月-81 该员工是:1981年第 4季度 入厂工作的
08-9月 -81 该员工是:1981年第 3季度 入厂工作的
23-5月 -87 该员工是:1987年第 2季度 入厂工作的
03-12月-81 该员工是:1981年第 4季度 入厂工作的
03-12月-81 该员工是:1981年第 4季度 入厂工作的
23-1月 -82 该员工是:1982年第 1季度 入厂工作的
已选择14行。
scott@ORCL10G>