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: Two tables with same name, one uppercase, one lowercase

Re: Two tables with same name, one uppercase, one lowercase

From: Terry Dykstra <tdykstra_at_cfol.ab.ca>
Date: Tue, 20 Apr 1999 16:56:40 -0600
Message-ID: <371d05ff.0@news.cadvision.com>


enclose your weirdtable in quotes when doing a select. Personally I would get rid of it.

--
Terry Dykstra
Canadian Forest Oil Ltd.
Zar wrote in message <371CD788.A0544174_at_my-dejanews.com>...
>Hi...
>
>I have recently run across an interesting
>problem that I need to resolve.
>It's not my database, so it's fortunately
>not really my problem, but it has piqued
>my curiosity nonetheless.
>
>There are two tables owned by the same schema
>that have the same name, but one is in uppercase,
>and one is in lowercase... like so:
>
>SQLWKS> select owner, table_name, tablespace_name,
> 2> initial_extent, next_extent pct_increase, num_rows, blocks
> 3> from sys.dba_tables
> 4> where owner = 'USER1'
> 5> and upper(table_name) like 'WEIRD%';
>OWNER TABLE_NAME
>TABLESPACE_NAME INITIAL_EX PCT_INCREA NUM_ROWS BLOCKS
>------------------------------ ------------------------------
>------------------------------ ---------- ---------- ----------
>----------
>USER1 WEIRDTABLE
>USERDATA 16384 16384 3 1
>USER1 weirdtable
>USERDATA 57344 57344
>
>2 rows selected.
>
>Upon further investigation, I found the following:
>
>SQLWKS> select * from WEIRDTABLE;
>FIELD1 FIELD2
>------ ------
>Value1 Value1
>Value2 Value2
>Value3 Value3
>3 rows selected.
>
>SQLWKS> select * from weirdtable;
>FIELD1 FIELD2
>------ ------
>Value1 Value1
>Value2 Value2
>Value3 Value3
>3 rows selected.
>
>It looks like whenever I issue a select against it,
>it's defaulting to the uppercase table.
>
>I take it Oracle's SQL parser automatically converts to
>uppercase the critical parts of any statement issued.
>
>I expect that it's a phantom value in some
>hidden system table somewhere.
>
>So, any ideas? should I worry the DBA about it,
>or is it mostly harmless?
>
>Thanks!
>--Zar
>
Received on Tue Apr 20 1999 - 17:56:40 CDT

Original text of this message

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