| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1400 人关注过本帖
标题:ORCLE中SQL语句这句是什么意思呀!
只看楼主 加入收藏
cao6623696
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-4-16
收藏
 问题点数:0 回复次数:0 
ORCLE中SQL语句这句是什么意思呀!
select areaname 分公司,c1 SDH,c2 出租网元,c3 小计1,c4 ATM,c5 FR,c6 MPLSVPN,c7 DDN,c8 设备出租,c9 设备代维,c10 小计2,c11 普通,c12 汇聚,c13 小计3,c14 XDSL,c15 LAN,c16 其他,c17 小计4,c18 服务器托管,c19 机架租赁,c20 小计5,c21 合计
FROM(
SELECT MAX(areaname) areaname,
SUM(DECODE(classname,'SDH',fee,0)) c1,
SUM(DECODE(classname,'出租网元',fee,0)) c2,
SUM(DECODE(classname,'SDH',fee,0)+DECODE(classname,'出租网元',fee,0)) c3,
SUM(DECODE(classname,'ATM',fee,0)) c4,
SUM(DECODE(classname,'FR',fee,0)) c5,
SUM(DECODE(classname,'MPLSVPN',fee,0)) c6,
SUM(DECODE(classname,'DDN',fee,0)) c7,
SUM(DECODE(classname,'设备出租',fee,0)) c8,
SUM(DECODE(classname,'设备代维',fee,0)) c9,
SUM(DECODE(classname,'ATM',fee,0)+DECODE(classname,'FR',fee,0)+DECODE(classname,'MPLSVPN',fee,0)+DECODE(classname,'DDN',fee,0)+DECODE(classname,'设备出租',fee,0)+DECODE(classname,'设备代维',fee,0)) c10,
SUM(DECODE(classname,'互联网专线普通',fee,0)) c11,
SUM(DECODE(classname,'互联网专线汇聚',fee,0)) c12,
SUM(DECODE(classname,'互联网专线普通',fee,0)+DECODE(classname,'互联网专线汇聚',fee,0)) c13,
SUM(DECODE(classname,'XDSL',fee,0)) c14,
SUM(DECODE(classname,'LAN',fee,0)) c15,
SUM(DECODE(classname,'其他',fee,0)) c16,
SUM(DECODE(classname,'XDSL',fee,0)+DECODE(classname,'LAN',fee,0)+DECODE(classname,'其他',fee,0)) c17,
SUM(DECODE(classname,'服务器托管',fee,0)) c18,
SUM(DECODE(classname,'机架租赁',fee,0)) c19,
SUM(DECODE(classname,'服务器托管',fee,0)+DECODE(classname,'机架租赁',fee,0)) c20,
SUM(DECODE(classname,'合计',fee,0)) c21,
oldareaid
FROM(
SELECT MAX(areaname) areaname,SUM(fee) fee,oldareaid,classname
FROM REPORT_INCOME
WHERE billingcycleid='200702'
GROUP BY oldareaid,classname
)
GROUP BY oldareaid
DECODE(classname,'服务器托管',fee,0)) 这句谁能解释下?里面的FEE参数是什么意思?
搜索更多相关主题的帖子: SQL ORCLE 语句 服务器托管 fee 
2007-04-20 09:48
快速回复:ORCLE中SQL语句这句是什么意思呀!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030195 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved