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: Mauricio B. Falleiros <mauricio_at_uniconsult.com.br>
Date: Thu, 22 Apr 1999 09:23:28 +0000
Message-ID: <Pine.LNX.3.96.990422092015.18213A-100000@samba.uss.UUCP>

Try using the lowercase between double quotes, as

desc "weirdtable"

select * from "weirdtable";

I have seen this happening when a friend created a table in Oracle DB via MS-Access.

I think (but not sure) Oracle tools (Forms,Reports,Plus etc) will always see just the uppercase named table.

Hopes this can make a way to satisfy your curiosity.

Regards,
Mauricio.

--

Mauricio Bellissimo Falleiros <mailto:mbf_at_uniconsult.com.br>

Uniconsult Sistemas e Servicos <mailto:uss_at_uniconsult.com.br>

On Tue, 20 Apr 1999, Zar wrote:

> 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 Thu Apr 22 1999 - 04:23:28 CDT

Original text of this message

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