| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 6162 人关注过本帖
标题:遇到一个棘手的问题 希望哥哥姐姐帮我解决一下 提示ORA-01722: 无效数字
取消只看楼主 加入收藏
慧根
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2018-8-15
结帖率:0
收藏
 问题点数:0 回复次数:3 
遇到一个棘手的问题 希望哥哥姐姐帮我解决一下 提示ORA-01722: 无效数字
------项目勘察反馈及时率
 
 select ty.nameabbr as 区县,kcgs.zcount as 总数,kcjs.jscount as 及时数,
 case when kcgs.zcount is not null and kcgs.zcount<>0 then round((kcjs.jscount/kcgs.zcount*100),3)||'%' else '0%' end  及时率  
   from hbrmw6.rms_county ty
 left join (select dt.porta_county_id,count(distinct dt.flow_id) as  zcount from  v_project_survey_data dt
 left join t_bpm_form_info fo on dt.flow_id=fo.flow_id  where  to_char(fo.send_time,'yyyy-mm-dd')>='2018-01-01'
and  fo.end_time>=to_date('2018-03-01', 'yyyy-mm-dd') and fo.end_time<=to_date('2018-03-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
and fo.app_type='platform'  and dt.project_type1='2' and dt.project_type2 in ('2','3') and dt.pexpand3='装机模式'   group by dt.porta_county_id ) kcgs on ty.int_id=kcgs.porta_county_id
 left join (select dt.porta_county_id,count(distinct dt.flow_id) as  jscount from  v_project_survey_data dt
 left join t_bpm_form_info fo on dt.flow_id=fo.flow_id  where  to_char(fo.send_time,'yyyy-mm-dd')>='2018-01-01'
and  fo.end_time>=to_date('2018-03-01', 'yyyy-mm-dd') and fo.end_time<=to_date('2018-03-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
and fo.app_type='platform'  and dt.project_type1='2' and dt.project_type2 in ('2','3') and  dt.pexpand3='装机模式'  
 and (fo.end_time-fo.send_time)<=dt.limittime   group by dt.porta_county_id ) kcjs on ty.int_id=kcjs.porta_county_id   
 where ty.city_id='43'and ty.stateflag=0
 order by  ty.nameabbr;     

[此贴子已经被作者于2018-8-16 14:49编辑过]

搜索更多相关主题的帖子: and left join where to_date 
2018-08-15 16:12
慧根
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2018-8-15
收藏
得分:0 
and  fo.end_time>=to_date('2018-03-01', 'yyyy-mm-dd') and fo.end_time<=to_date('2018-03-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
时间调整为
 and  fo.end_time>=to_date('2018-03-01', 'yyyy-mm-dd') and fo.end_time<=to_date('2018-03-19 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
执行便不报错 。
若调整为 and  fo.end_time>=to_date('2018-03-01', 'yyyy-mm-dd') and fo.end_time<=to_date('2018-03-20 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
还是会报错ORA-01722: 无效数字


希望哥哥姐姐能够帮我解答

2018-08-15 16:45
慧根
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2018-8-15
收藏
得分:0 
一到七月份只有在查询三月份数据的时候报“ORA-01722: 无效数字”这个错误 ,但是查询三月一日到三月十九日数据的时候不报错误。查询若有三月二十日之后便会报错。
2018-08-16 14:39
慧根
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2018-8-15
收藏
得分:0 
不知道我表达的是否足够清楚 ,真心希望有人帮我解决一下这个问题,谢谢!
2018-08-16 14:42
快速回复:遇到一个棘手的问题 希望哥哥姐姐帮我解决一下 提示ORA-01722: 无效数 ...
数据加载中...
 
   



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

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