Oracle行列转换的简单实现
来源:互联网 发布:淘宝退差价怎么弄 编辑:程序博客网 时间:2024/05/02 00:20
declare
cursor cemp is select to_char(HIREDATE,'yyyy') from emp;
phiredate varchar2(4);
count80 number:=0;
count81 number:=0;
count82 number:=0;
count87 number:=0;
begin
open cemp;
loop
fetch cemp into phiredate;
exit when cemp%notfound;
if phiredate = '1980' then count80:=count80+1;
elsif phiredate = '1981' then count81:=count81+1;
elsif phiredate = '1982' then count82:=count82+1;
else count87:=count87+1;
end if;
end loop;
dbms_output.put_line('total|'||'1980|'||'1981|'||'1982|'||'1987');
dbms_output.put_line((count80+count81+count82+count87)||'|'||count80||'|'||count81||'|'||count82||'|'||count87);
close cemp;
end;
cursor cemp is select to_char(HIREDATE,'yyyy') from emp;
phiredate varchar2(4);
count80 number:=0;
count81 number:=0;
count82 number:=0;
count87 number:=0;
begin
open cemp;
loop
fetch cemp into phiredate;
exit when cemp%notfound;
if phiredate = '1980' then count80:=count80+1;
elsif phiredate = '1981' then count81:=count81+1;
elsif phiredate = '1982' then count82:=count82+1;
else count87:=count87+1;
end if;
end loop;
dbms_output.put_line('total|'||'1980|'||'1981|'||'1982|'||'1987');
dbms_output.put_line((count80+count81+count82+count87)||'|'||count80||'|'||count81||'|'||count82||'|'||count87);
close cemp;
end;
0 0
- Oracle行列转换的简单实现
- oracle 实现行列转换
- oracle实现行列转换
- Oracle中实现行列转换的方法
- Oracle中实现行列转换的方法
- 利用函数实现的oracle行列转换
- Oracle实现行列转换的方法分析
- Oracle的行列转换
- Oracle的行列转换
- Oracle的行列转换
- 简单的行列转换
- 简单的行列转换
- oracle sys_connect_by_path实现行列转换
- 关于oracle 的行列转换
- 关于ORACLE的行列转换
- 行列转换的简单统计
- Oracle一个典型行列转换的几种实现方法
- Oracle一个典型行列转换的几种实现方法
- CentOS 6.5搭建Tomcat+Mysql+JDK+FTP环境并部署项目
- Cordova添加android平台时选择安装版本
- 运行vs时会出现的一些小错误(不断更新,小白专用)
- 小e开发板音频模式下的处理流程(i2s和slc和补充MES_FILE_TRANSFERS消息类型等)
- VanlOS 10 RedWhale 2016.1216 全容器化部署
- Oracle行列转换的简单实现
- C#中删除某个节点会留下一个空节点,这样删除就干净了
- weex服务项目搭建
- Android简易录音机
- NOIP2016 游记
- Connection实例是线程安全的吗
- 使用python进行收据搜集示例之different_format_data_processing
- 安卓开发——报错:Resources$NotFoundException: String resource ID #0x2fc
- 提高实验_递归——从递推到递归(待填坑)