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: toad and double-quoting column name

Re: toad and double-quoting column name

From: <sybrandb_at_hccnet.nl>
Date: Sat, 15 Sep 2007 16:15:21 +0200
Message-ID: <f1qne3tro5aa4mb1r5j1ppe9tvfbu1k6dj@4ax.com>


On Sat, 15 Sep 2007 06:39:51 -0700, ken quirici <ken.quirici_at_excite.com> wrote:

>Hi,
>
>I had an issue at work which has been bugging me since yesterday, so I
>thought I might get some help before my weekend gets ruined.
>
>I was in TOAD logged in to schema_1 which has privileges to read
>schema_2
>in the same database.
>
>I tried
>
>select count(*) from schema2.table_a;
>
>and got an "unknown table" response from Oracle.
>
>My dba suggested
>
>select count(*) from schema2."table_a"
>
>and it worked.
>
>I didn't get a chance to ask him why, so my question is:
>
>what is the nature of this function of double quotes in I assume
>Oracle (rather than TOAD) functionality? In other words, does
>Oracle have a rule like:
>
>to access a table in a schema to which the schema you're in
>has read access, enclose it's name in your sql statement in
>doublequotes
>
>I checked the master index of the Oracle 9i documents and found
>only two refs to the doublequote, neither of which seemed relevant.
>
>Thanks much for any ray of light.
>
>Ken Quirici

1 'Unknow table' is NOT an Oracle error
2 apparently "table_a" is not a column name 3 Oracle has general rules for *identifiers*. Identifiers are table names, column names, view names, etc, etc,etc When *identifiers* include special characters like lowercase characters
spaces
hyphens
etc.
you have to double quote the identifier. Obviously this is documented.
Obviiously you should avoid those special characters.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Sat Sep 15 2007 - 09:15:21 CDT

Original text of this message

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