Unanswered: java.sql.SQLException: ORA-01722: invalid number
We just migrated from MySQL 3.23 to Oracle 9i and I am getting some problems when I try to invoke simple queries.
I have a table which contains two fields of VARCHAR2 when I execute the following query “"SELECT myFiled FROM myTable ” the results are as expected,
But when I tries to execute " SELECT myFiled FROM myTable WHERE myOtherField='myValue'" I am getting :
java.sql.SQLException: ORA-01722: invalid number,
Double "" quoting in Oracle is a means to circumvent reserved words, hence after you have one query which fails and one with "" which doesn't, one doesn't need to move much further to arrive at a solution.
*IF* the double quotes fix your problem, don't assume the problem is over. There have been cases where Oracle would let you create a table with a reserved word for a column name, but not create a trigger on the same table because of the column name with or without the double quotes. (search this forum for examples).
So even if the reserved word *is* your problem (remember I'm guessing), change it if you can.