update ys_dca03
set dym = (select case when jtys = 400 then isnull(ymbcd, 0) * 2
else case when isnull(jgbcd, 0) / case when isnull(xzjgs, 0) = 0 then null else isnull(xzjgs,0) end =0 then null
else round(isnull(ymbcd, 0) / (isnull(jgbcd, 0) /case when isnull(xzjgs, 0) = 0 then null else isnull(xzjgs,0) end) * ygpjcd, 1) end
end dym
from ys_dca03 a
where ys_dca03.jcdm = '108'
and ys_dca03.jcdm = a.jcdm
and ys_dca03.jh = a.jh
and ys_dca03.csrq = a.csrq
and a.dym is null)
where jcdm = '108'
and dym is null这段中的条件where ys_dca03.jcdm = '108'
and ys_dca03.jcdm = a.jcdm
and ys_dca03.jh = a.jh
and ys_dca03.csrq = a.csrq
是什么意思? ys_dca03不就是a吗?
set dym = (select case when jtys = 400 then isnull(ymbcd, 0) * 2
else case when isnull(jgbcd, 0) / case when isnull(xzjgs, 0) = 0 then null else isnull(xzjgs,0) end =0 then null
else round(isnull(ymbcd, 0) / (isnull(jgbcd, 0) /case when isnull(xzjgs, 0) = 0 then null else isnull(xzjgs,0) end) * ygpjcd, 1) end
end dym
from ys_dca03 a
where ys_dca03.jcdm = '108'
and ys_dca03.jcdm = a.jcdm
and ys_dca03.jh = a.jh
and ys_dca03.csrq = a.csrq
and a.dym is null)
where jcdm = '108'
and dym is null这段中的条件where ys_dca03.jcdm = '108'
and ys_dca03.jcdm = a.jcdm
and ys_dca03.jh = a.jh
and ys_dca03.csrq = a.csrq
是什么意思? ys_dca03不就是a吗?
解决方案 »
- to_date,select 显示正常,update报错01840,输入值对于日期格式不够长
- 求一SQL语句
- ip地址改动后,怎样启动dbconsole,有什么好办法,试了几个方法都不行。100分急求。
- asp.net c# 汉字插入oracle数据表出现 列在此处不允许
- 如何写个触发器在A表插入记录后,将新添记录插入B表中,字段比较多,高分求简单写法
- Oracle驱动
- TOAD安装时的问题
- Oracle的时间字段
- 如何更改unix下oracle的密码???
- 问一个菜鸟问题
- 求助:请问如何在windows2003的安全模式下启动oracle9i的监听和数据库两个服务
- 远程客户机在net服务名配置中,测试连接服务器不成功!求救!
update ys_dca03 中的 表
where ys_dca03.jcdm = '108'
and ys_dca03.jcdm = ys_dca03.jcdm
and ys_dca03.jh = ys_dca03.jh
and ys_dca03.csrq = ys_dca03.csrq
and ys_dca03.dym is null或者
where a.jcdm = '108'
and a.jcdm = a.jcdm
and a.jh = a.jh
and a.csrq = a.csrq
and a.dym is null