> My intuition says: NO.
Your intution loses. :)
drop table a;
drop table b;
create table a
as
select object_id, object_name
from dba_objects
where rownum < 11
/
create table b
as
select to_char(object_id) object_id_char, object_name
from a
/
alter table b modify(object_id_char varchar2(50));
create or replace view abv
as
select a.object_name
from a, b
where a.object_id = b.object_id_char
/
select * from abv;
update b set object_id_char = 'Z' || object_id_char
/
commit;
select * from abv;
"Boivin, Patrice J" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 09/09/2003 01:49 PM
|
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> cc: Subject: overloading and = comparisons in SQL |
I don't know what to think re. this.
There is a view here that produces an error, I identified why -- in one AND
clause a number(9) datatype column is being joined with a varchar2(50)
datatype column.
The developer of this code says that this used to run, there must be
something wrong with the server.
I want to verify... Is there any kind of overloading invoked automatically
when Oracle compares columns of different datatypes?
i.e. if the varchar2(50) column only contains numbers, would Oracle convert
it automatically to number before making the comparison?
(My intuition says: NO. )
Patrice.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Boivin, Patrice J
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).