Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01722: invalid number - where clause in number column

713511Jul 23 2009 — edited Sep 6 2012
I am using Oracle 10g (10.2.0.4.0). In my programme I have a query looks like this :

select G_ID from LOCS where ID = x.
x is defined as unsigned int.

Here is the detail of the columns in table LOCS:
ID data type: NUMBER, with UNIQUE INDEX
G_ID data type: NUMBER, with NONUNIQUE INDEX

The programme runs without any problem most the time, but sometimes I have the error: ORA-01722: invalid number.
The data type: of the variable is correct. There is no conversion between char and number. How can I have this problem?

Any help would be much appreciated.

Knox
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2012
Added on Jul 23 2009
23 comments
6,347 views