将sql写出来看看,
统计不准是什么意思?
统计不准是什么意思?
解决方案 »
- 在线等:在SQL的企业管理器中,怎样查看表的修改日期?
- 请给一个触发器的例子,谢谢。
- 大侠帮忙看看这个报错是怎么回事,自增列的问题
- SQL SERVER 连接问题,能ping通服务器,但是连不上?
- SQL2008express中包含Business Intelligence Development Studio吗
- 任意更新拼接字符其中一个
- 那里有sqlserver精简版?就是没有企业管理器等只有一个服务管理器
- 如何提高这个语句的速度,送分!
- SqlServer存储过程的问题
- 请教一个SQL查询语句是否标准
- 我是初学者,问一个关于SQL的初级问题。望各位大虾帮助。
- 请问哪里有关于SQL SERVER7.0自带函数的介绍。如:GetDate() 急 谢谢了
SELECT “2001”||SUBSTR(deal_date,1,4),msc,trunk_groupin,
trunk_groupout,trunkin_type,trunkin_company,trunkin_feecode,
trunkout_type,trunkout_company,trunkout_feecode,call_type,
called_type,fee_type,roam_type,COUNT(*)
FROM tg_cdr
GROUP BY “2001”||SUBSTR(deal_date,1,4),msc,trunk_groupin,
trunk_groupout,trunkin_type,trunkin_company,trunkin_feecode,trunkout_type,
trunkout_company,trunkout_feecode,
call_type,called_type,fee_type,roam_type;结果不准就是只选出某几天的数据
如deal_date 为0201 到0220
可select 出来的缺几天的数据
因为Group by 语句主要使用了数据库的排序区和临时表空间,请检临时表空间的大小和语句操作时的数据库跟踪文件(.trc),看一看此时数据库有没有出错信息.怀疑由数据库出错而没有得到全部的记录.
请问这条SQL语句在什么地方执行,自已写的程序还是数据库提供的工具软件?
谢谢mycode 的指教,我会再查查的
等有了新的发现再指教如果能认识你,真是我的荣幸
我的临时表空间有4G呀
好象也没产生什么.trc
请问数据库的排序区是在哪儿呀
见笑了
(SELECT “2001”¦¦SUBSTR(deal_date,1,4) as c1,msc as c2,trunk_groupin as c3,
trunk_groupout as c4,trunkin_type as c5,trunkin_company as c6,trunkin_feecode as c7,
trunkout_type as c8,trunkout_company as c9,trunkout_feecode as c10,call_type as c11,
called_type as c12,fee_type as c13,roam_type as c14,COUNT(*) as c15
FROM tg_cdr) as t
group by c1, c2 ... c15
问题现已解决
如下:
在此表上打开了并行选项
把此选项关掉,group by 统计正常
已咨询过oracle技术支持,得到如下建议:
请将oracle升级到8.1.7