Oracle数据库执行查询语句报错:无效数字。

where t.userid = 'EIPUSER9969' 这句有问题 估计t.userid是数值型的 'EIPUSER9969'转换不成数值型,所以报无效数字。
Oracle数据库执行查询语句报错:无效数字。
to_number(to_char(t.access_time,'yyyy-MM-dd hh24:mm:ss')) access_time,
这句话出错.
原因
假如 t.access_time = 2011年10月10日 10:00:00
那么
to_char(t.access_time,'yyyy-MM-dd hh24:mm:ss')
的结果 = 2011-10-10 10:00:00

然后你想
to_number ( '2011-10-10 10:00:00' ) 自然是要报错了。2011-10-10
where t.userid = 'EIPUSER9969' 这句有问题 估计t.userid是数值型的 'EIPUSER9969'转换不成数值型,所以报无效数字。2011-10-10
to_number(to_char(t.access_time,'yyyy-MM-dd hh24:mm:ss')) access_time,
改为to_char(t.access_time,'yyyy-MM-dd hh24:mm:ss') as access_time,
不知道你又搞成to_number干什么2011-10-10
_number(to_char(t.access_time,'yyyy-MM-dd hh24:mm:ss')) access_time,2011-10-10
mengvlog 阅读 81 次 更新于 2025-12-16 13:30:33 我来答关注问题0
檬味博客在线解答立即免费咨询

报错相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部