Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: java.sql.SQLException: ORA-01722: invalid number
"Skinny Chinese Guy" <skinnychineseguy_at_yahoo.com> wrote in message
news:95f0ce59.0109271131.564e308b_at_posting.google.com...
> Hi,
>
> I know this can happen when you try to convert from a string to a
> number but is there any other case where this exception can happen?
> I'm INSERTing into a table with columns of NUMBER, VARCHAR2, and DATE
> and very certain that I'm putting in the proper types. But saw this
> exception happen before. Haven't been able to reproduce it, but can't
> figure out why the heck it happend on the INSERT.
>
> Is there any other weird case that one gets this exception, or some
> other situation where you get this exception but its misleading?
> Thanks.
This particular exception is *never* misleading.
Hunt a bit deeper in your own code, or provide more clues.
You may be the victim of implicit type conversion, but usually that can be
prevented by using the correct conversion on the right hand side of a where
clause.
Ora-1722 *always* has a *logical* explanation.
Regards,
Sybrand Bakker, Senior Oracle DBA Received on Thu Sep 27 2001 - 14:50:28 CDT