Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: The reserved word "ACCESS" in a field list of a PL SQL Query

Re: The reserved word "ACCESS" in a field list of a PL SQL Query

From: Lee <lduhl_at_corp.realcomp.com>
Date: 10 Sep 2004 13:09:34 -0700
Message-ID: <719532c5.0409101209.2ec81771@posting.google.com>


lduhl_at_corp.realcomp.com (Lee) wrote in message news:<719532c5.0409080702.7a5ec43c_at_posting.google.com>...
> We have a field in our tables call "ACCESS", but we are unable to
> reference this field in a query becuase it appears to be a reserved
> word in Oracle (we are running Oracle 10g on Windows 2k).
>
> A query like the following results in a "Ora-00936:Missing Expression"
> error message:
> SELECT Access FROM sys.MyTable.
>
> The Field "Access" is a valid field within the table "MyTable".
>
> Additionally, our application dynamically builds this query so any
> soluiton that includes "Aliasing" this field probably will not work.
>
> Is there anyway around quering this field in the table without
> re-naming the field in the table?
>
> Thanks for any info that can be provided.
> Lee

Thanks to all who responded the info was not only usefull but down right entertaining to read!

With my next post, I will be more careful with the sample I post. Relax, we did not create anything in the "sys" name space, especially something as intelligently thought out as "MyTable". (My doctor once wanted me to give him a stool "sample", but I could not go, so I just brought him one from my dog. My doctor never said anything, but I have been on Heartworm medicine ever since!)

In defense of the column ('field') named "Access" this came over from the conversion of the MS Sql db that we are in the process of porting.  This "Name" does pertain to it's purpose and did not cause any problems in the MS SQL world.

As for the Oracle documentation, this problem was originally researched via their documentation, but finding anything in said documentation is always a major task. Once its found its well explained, but finding it is 99.9% of the battle.

Well, now I must go back to my doctor and get my hand bandaged from all the slaps with a ruler I took from the responses to my original post!

Later
Lee Received on Fri Sep 10 2004 - 15:09:34 CDT

Original text of this message

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