Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Query anomaly...
Hi,
> At some time in the past the application that uses this database was of
> the opinion, that the CUSTOMER_ID field only contained numbers. Hidden
> somewhere in the depths of the application there was found the following
> query:
>
> SELECT * FROM CUSTOMER WHERE CUSTOMER_ID = 12345 ;
>
As far as i know oracle tries to convert every customer_id into a number to compare it with 12345. It does not convert 12345 into a varchar. So if *no* column contains any non-numeric value this query works. But if the is a non-numeric value the conversion fails. Maybe that's the difference between your two DBs.
Regards
Dirk Mika
Received on Thu Nov 08 2001 - 04:59:28 CST
![]() |
![]() |