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

Home -> Community -> Usenet -> c.d.o.server -> Re: Dazed and confused

Re: Dazed and confused

From: -={Giorgio}=- <leva.md3496_at_mclink.it>
Date: Mon, 13 Oct 2003 12:13:04 +0200
Message-ID: <bmdtfj$8r5$1@newsreader1.mclink.it>

[...]
> 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

Original text of this message

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