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: mar <mar_at_notexist.com>
Date: Mon, 13 Oct 2003 18:43:57 +0200
Message-ID: <bmekoi$lscn2$1@ID-174077.news.uni-berlin.de>


"Anurag Varma" <avarmadba.skipthis_at_yahoo.com> wrote

> You missed the point!
> If you don't explicitly define the conversion, oracle defines it for you.
>
> So in essence its trying to do the following:
>
> SELECT COUNT(*) FROM MYTABLE
> WHERE to_number(XCODE)=1234567890123 AND XFLAG=0;
> ^^^^^^^^^
>
> so if it uses the filter criteria xflag=0 first, it will try using the
> filter criteria
> to_number(xcode) = 1234567890123 next.
>
> So it errors out when it encounters the following conversion
> to_number('abcdefghij') = 1234567890123
> ^^^^^^^^^^^^^^^^^^

Well, somebody misses a point here, that's obvious. It's probably me, I'm pretty dense today.

However, I wanted to say that there is NO such value as 'abcdefghij' in your example above. I repeat: all strings are composed of digits only! What gives?

> You need to prevent this implicit conversion by stating
> XCODE = '1234567890123' !!!
>
> I don't understand why you are hellbent on not using the correct method.

I'm not hellbent, actually the example/puzzle comes from my coworker. I warned him to use apostrophes. Received on Mon Oct 13 2003 - 11:43:57 CDT

Original text of this message

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