这段SQL写法有错吗?
时间:2011-09-08
来源:互联网
各位大侠,帮忙看看这段SQL有错吗?~~~ 我弄不明白了!~~ 有不明白的地方可以问我谢谢了!
select 'N',
oma01,
' ',
' ',
'',
isa01,
oma23,
isa08t - nvl(sum(tc_oob09), 0),
isa08t * oma24 - nvl(sum(tc_oob10), 0),
oma00,
oma55,
oma54t
from (SELECT 'N',
oma01,
' ',
' ',
'',
isa01,
oma23,
isa08t,
isa08t * oma24,
oma00,
oma55,
oma54t
FROM omab_tmp, isa_file
where isa04 = oma01) a,
(select tc_oob16, nvl(sum(tc_oob09), 0), nvl(sum(tc_oob10), 0)
from tc_ooa_file, tc_oob_file
where tc_ooa01 = tc_oob01
and tc_ooaconf <> 'X'
group by tc_oob16) b
where a.isa01 = b.tc_oob16(+)
作者: kingdomfx 发布时间: 2011-09-08
表结构你也不说明,错误你也不说,咋整
作者: opps_zhou 发布时间: 2011-09-08
isa08t - nvl(sum(tc_oob09), 0),
isa08t * oma24 - nvl(sum(tc_oob10), 0),
里面的nvl(sum(tc_oob09), 0),
和这个 nvl(sum(tc_oob10), 0)需要建立别名使用,不能直接用
isa08t * oma24 - nvl(sum(tc_oob10), 0),
里面的nvl(sum(tc_oob09), 0),
和这个 nvl(sum(tc_oob10), 0)需要建立别名使用,不能直接用
作者: yangqm22 发布时间: 2011-09-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28