ORA-01722: invalid number

---问题

select owner,index_name,DEGREE from DBA_INDEXES where DEGREE>1

*

ERROR at line 1:

--1 获取执行跟踪信息

SQL> set autotrace traceonly

SQL> select owner,index_name,DEGREE from DBA_INDEXES where DEGREE=1 and rownum<2;

Elapsed: 00:00:00.05

Execution Plan

----------------------------------------------------------

Plan hash value: 3920975716

-------------------------------------------------------------------------------------------------------

| Id  | Operation                            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |

-------------------------------------------------------------------------------------------------------

|   0 | SELECT STATEMENT                     |                |     1 |   120 |    18   (0)| 00:00:01 |

|*  1 |  COUNT STOPKEY                       |                |       |       |            |          |

|   2 |   NESTED LOOPS OUTER                 |                |     1 |   120 |    18   (0)| 00:00:01 |

|   3 |    NESTED LOOPS OUTER                |                |     1 |   117 |    17   (0)| 00:00:01 |

|   4 |     NESTED LOOPS                     |                |     1 |   106 |    16   (0)| 00:00:01 |

|   5 |      NESTED LOOPS                    |                |     1 |   102 |    15   (0)| 00:00:01 |

|   6 |       NESTED LOOPS OUTER             |                |     1 |    85 |    14   (0)| 00:00:01 |

|   7 |        NESTED LOOPS                  |                |     1 |    81 |    13   (0)| 00:00:01 |

|   8 |         NESTED LOOPS OUTER           |                |     1 |    73 |    12   (0)| 00:00:01 |

|   9 |          NESTED LOOPS                |                |     1 |    65 |    11   (0)| 00:00:01 |

|* 10 |           TABLE ACCESS FULL          | IND$           |    25 |   750 |    10   (0)| 00:00:01 |

|* 11 |           TABLE ACCESS BY INDEX ROWID| OBJ$           |     1 |    35 |     1   (0)| 00:00:01 |

|* 12 |            INDEX UNIQUE SCAN         | I_OBJ1         |     1 |       |     0   (0)| 00:00:01 |

|  13 |          TABLE ACCESS BY INDEX ROWID | OBJ$           |     1 |     8 |     1   (0)| 00:00:01 |

|* 14 |           INDEX UNIQUE SCAN          | I_OBJ1         |     1 |       |     0   (0)| 00:00:01 |

|  15 |         TABLE ACCESS BY INDEX ROWID  | OBJ$           |     1 |     8 |     1   (0)| 00:00:01 |

|* 16 |          INDEX UNIQUE SCAN           | I_OBJ1         |     1 |       |     0   (0)| 00:00:01 |

|  17 |        TABLE ACCESS CLUSTER          | USER$          |     1 |     4 |     1   (0)| 00:00:01 |

|* 18 |         INDEX UNIQUE SCAN            | I_USER#        |     1 |       |     0   (0)| 00:00:01 |

|  19 |       TABLE ACCESS CLUSTER           | USER$          |     1 |    17 |     1   (0)| 00:00:01 |

|* 20 |        INDEX UNIQUE SCAN             | I_USER#        |     1 |       |     0   (0)| 00:00:01 |

|  21 |      TABLE ACCESS CLUSTER            | USER$          |     1 |     4 |     1   (0)| 00:00:01 |

|* 22 |       INDEX UNIQUE SCAN              | I_USER#        |     1 |       |     0   (0)| 00:00:01 |

|  23 |     TABLE ACCESS CLUSTER             | SEG$           |     1 |    11 |     1   (0)| 00:00:01 |

|* 24 |      INDEX UNIQUE SCAN               | I_FILE#_BLOCK# |     1 |       |     0   (0)| 00:00:01 |

|  25 |    TABLE ACCESS CLUSTER              | TS$            |     1 |     3 |     1   (0)| 00:00:01 |

|* 26 |     INDEX UNIQUE SCAN                | I_TS#          |     1 |       |     0   (0)| 00:00:01 |

-------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):

---------------------------------------------------

1 - filter(ROWNUM<2)

10 - filter(TO_NUMBER(DECODE("I"."DEGREE",32767,‘DEFAULT‘,TO_CHAR(NVL("I"."DEGREE",1))))=1

AND BITAND("I"."FLAGS",4096)=0)

11 - filter(BITAND("O"."FLAGS",128)=0)

12 - access("O"."OBJ#"="I"."OBJ#")

14 - access("I"."INDMETHOD#"="ITO"."OBJ#"(+))

16 - access("I"."BO#"="IO"."OBJ#")

18 - access("ITO"."OWNER#"="ITU"."USER#"(+))

20 - access("U"."USER#"="O"."OWNER#")

22 - access("IO"."OWNER#"="IU"."USER#")

24 - access("I"."TS#"="S"."TS#"(+) AND "I"."FILE#"="S"."FILE#"(+) AND

"I"."BLOCK#"="S"."BLOCK#"(+))

26 - access("I"."TS#"="TS"."TS#"(+))

Statistics

----------------------------------------------------------

8  recursive calls

0  db block gets

23  consistent gets

0  physical reads

0  redo size

655  bytes sent via SQL*Net to client

492  bytes received via SQL*Net from client

2  SQL*Net roundtrips to/from client

0  sorts (memory)

0  sorts (disk)

1  rows processed

--2

select TO_NUMBER(DECODE("I"."DEGREE",32767,‘DEFAULT‘,TO_CHAR(NVL("I"."DEGREE",1)))) from sys.ind$ i --语句测试

--3 发现对象异常

select TO_NUMBER(DECODE("I"."DEGREE",32767,‘DEFAULT‘,TO_CHAR(NVL("I"."DEGREE",1)))) from sys.ind$ i where obj#<>‘55180‘

--4 通过几个库查询 11g 没有这个问题 10g 有这个问题

--10046 跟踪不正常 没发现问题根本

--errorstatk 跟踪里面太多内部信息,无法确定具体原因

--还是合理猜想+数据验证获取结论

ORA-01722: invalid number

时间: 2024-10-07 06:22:59

ORA-01722: invalid number的相关文章

解决sqoop报错Invalid number; item = ITEM_UNICODE

报错栈: java.sql.SQLException: Invalid number; item = ITEM_UNICODE at com.intersys.jdbc.SysList.getInt(SysList.java:1735) at com.intersys.jdbc.CacheResultSet.getInt(CacheResultSet.java:247) at org.apache.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWrit

讨厌麻烦的ora 01722无效数字

webservice开发过程中,数据库由原来的oracle改为现在的sql server.然后重新调试,结果报出ora 01722无效数字的错误. 由于连接oracle数据库的时候并没有问题,所以一开始我以为是数据库不同,导致部分数据类型差异,(但又觉得有点离谱,切换数据库,不至于会导致这种错误吧) 经过排查,总结得出如下: 1.对于两个类型不匹配(一个数字类型,一个非数字类型,同下)的值进行赋值操作;2.两个类型不匹配的值进行比较操作(例如,"=");3.to_number函数中的值

ORA-01722: invalid number,ORA-12801

SQL: SELECT /*+ parallel(a,32) */ a.id           ,a.data_date           ,a.mobile_num           ,a.mobile_code           ,b.prov AS mobile_prov           ,b.city AS mobile_city           ,b.mobile_oper           ,a.psam           ,a.psam_code        

&#39;Invalid update: invalid number of rows in section xx. The number of rows contained in an existing section after the update (xxx)...

'Invalid update: invalid number of rows in section 5.  The number of rows contained in an existing section after the update (299) must be equal to the number of rows contained in that section before the update (276), plus or minus the number of rows

check_jmx4perl 1.10 findDeadlockedThreads ERROR &quot;Invalid number of operation arguments&quot;

Hi, The problem is:$ check_jmx4perl --url http://localhost:8081/jolokia --mbean java.lang:type=Threading --operation findDeadlockedThreads --null no-deadlock --string 1 --critical \!no-deadlock --critical 10UNKNOWN - Error: 400 java.lang.IllegalArgum

&#39;Invalid update: invalid number of sections. The number of sections contained in the table view aft

问题:(删除tableview中的section时) Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections.  The number of sections contained in the table view after the update (5) must be equal to th

ORA-01722: invalid number 异常【我改】

我的情况是,在sql中两个字段相等最为条件时,这两个字段一个类型是字符串,一个是数字,而字符串类型的字段中有一条记录不能转成为数字造成的,解决方法,用 to_char将数字类型的字段转换为字符串再比较. 转: ORA-01722: invalid number 如果某一个列定义的是varchar2字符串类型的,查询的时候使用了where xxx=1,让列名等于一个数字,那么,如果这个列里面都是数字,那么不报错,如果列里面只要有一个是非数字的,则报错.因为,oracle使用了隐式的转换,to_nu

问题:oracle 计算年龄;结果:oracle中根据生日计算年龄的问题

SELECT FLOOR(MONTHS_BETWEEN(SYSDATE,birthday)/12,1) FROM ltteacherinfo where name='朱雪东111'这个报错ORA 00909 :invalid number of arguments这个是怎么错了,计算年龄该怎么算,年龄要整数 --计算员工年龄SELECT FLOOR(MONTHS_BETWEEN(SYSDATE,birthdate)/12) FROM   ps_personal_data             

LeetCode 1056. Confusing Number

原题链接在这里:https://leetcode.com/problems/confusing-number/ 题目: Given a number N, return true if and only if it is a confusing number, which satisfies the following condition: We can rotate digits by 180 degrees to form new digits. When 0, 1, 6, 8, 9 are