在Oracle中使用数据透视表的建议 [英] Advice Using Pivot Table in Oracle

查看:80
本文介绍了在Oracle中使用数据透视表的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个报告,并且我应该使用数据透视表.报告将按类别分组.在声明时用例不是很好,因为类别很多.u可以认为Northwind数据库是示例,所有类别都可以显示为列和报表",将显示客户在类别之间的偏好.我不知道其他解决方案,而看到的示例是Internet for Sql Server中的存储过程.除了用例何时,您是否知道一个解决方案?

i need a report and i should use pivot table for it.Report will be group by categories .It is not good to use case when statement because there are many categories.u can think Northwind Database as sample and All Categories will be shown as Columns and Report will show customers preference among Categories.I dont know another solution and saw examples as Stored Procedures in Internet for Sql Server.Do u know a Solution except for using case when?

谢谢

推荐答案

一旦获得Oracle 11G,就会有一个的文章.

Once you get Oracle 11G there is a built-in PIVOT feature. Prior to that, you are restricted to using CASE (or DECODE) expressions. I have an article on how to automate doing that on my blog.

这篇关于在Oracle中使用数据透视表的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆