Home > Database > Mysql Tutorial > body text

Oracle的ORA-01722 错误是什么

WBOY
Release: 2016-06-07 16:20:46
Original
1424 people have browsed it

在两个数据库上执行同一个语句 select code_id code,code_value name from code_value_t t where code_id like '0_' and class_code = 22 --这里出错 加上引号就ok order by code_id 一个正常,另一个却报错ORA-01722,相同的字段类型,相同的数据库版本,后

  在两个数据库上执行同一个语句

  select code_id code,code_value name

  from code_value_t t

  where code_id like '0_'

  and class_code = 22

  order by code_id

  一个正常,,另一个却报错ORA-01722,相同的字段类型,相同的数据库版本,后来发现在where中进行了类型转换,如果加上单引号,都不报错,在报错的数据库中查找数据,发现有条数据是字符串类型的,oracle转换为数字比较时出错,因此删除掉这条测试数据ok。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!