ORA-01722: invalid number - where clause in number column
713511Jul 23 2009 — edited Sep 6 2012I 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