关于DECODE的问题(很急)

[复制链接]
查看11 | 回复4 | 2006-7-20 13:19:20 | 显示全部楼层 |阅读模式
请问decode的统计值是否有限制,我在统计时出现如下提示:
ORA-01467分类(sort)关键字过长
回复

使用道具 举报

千问 | 2006-7-20 13:19:20 | 显示全部楼层
我的数据库版本为8.1.0.5
回复

使用道具 举报

千问 | 2006-7-20 13:19:20 | 显示全部楼层
ORA-01467
sort key too long
Cause:
A DISTINCT, GROUP BY, ORDER BY, or SET operation requires a sort key longer than that supported by ORACLE. Either too many columns or too many group functions were specified in the SELECT statement.
Action:
Reduce the number of columns or group functions involved in the operation.
回复

使用道具 举报

千问 | 2006-7-20 13:19:20 | 显示全部楼层
请问decode的统计值是否有限制,我在统计时出现如下提示:
ORA-01467 分类(sort)关键字过长
1。楼主将decode减少一些,先试一下,结果如何?
2。Sum(Decode(GM,'A015',Fczl,Null)),
在这条语句中,不一定能得到楼主想要的结果,因为有可能sum(null),
可以修改为Sum(Decode(GM,'A015',Fczl,0)),
回复

使用道具 举报

千问 | 2006-7-20 13:19:20 | 显示全部楼层
没用了
我加了having 也不行,看来只能分开统计了.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行