Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: java.sql.SQLException: ORA-01722: invalid number

Re: java.sql.SQLException: ORA-01722: invalid number

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 27 Sep 2001 21:50:28 +0200
Message-ID: <tr70ogs6ffsq32@news.demon.nl>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US