Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dazed and confused
[...]
> ERROR at line 1:
> ORA-01722 invalid number
>
> (Orcl says XCODE receives an invalid number)
>
>
>
> Questions:
>
> 1) why I am allowed to use XCODE=1234567890123 in the WHERE clase at all,
> since XCODE is a CHAR(15)
>
> 2) why do I get the error above when using XFLAG=0, but not with XFLAG=1
Implicit conversion...
Oracle forces the char(15) of the table to behave like a number
(implicitly converting it)..
Now with xflag=1 the query return a result set with xcode (chars)
that can be converted to a number
whilst with xflag=0 the query return a result set with some xcode
that can't be converted to a number.. eg: '123rty'
That's why O raises an exception.
/G Received on Mon Oct 13 2003 - 05:13:04 CDT