From: keithdmiller@my-deja.com
Newsgroups: comp.databases.oracle.misc
Subject: Re: "views" as a column name
Date: Wed, 11 Oct 2000 02:33:14 GMT
Organization: Deja.com - Before you buy.
Lines: 79
Message-ID: <8s0jha$94v$1@nnrp1.deja.com>
References: <8rvejm$8v6$1@nnrp1.deja.com> <971199935.27148.0.nnrp-07.9e984b29@news.demon.co.uk>
NNTP-Posting-Host: 206.243.194.70
X-Article-Creation-Date: Wed Oct 11 02:33:14 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
X-Http-Proxy: 1.1 x67.deja.com:80 (Squid/1.1.22) for client 206.243.194.70
X-MyDeja-Info: XMYDJUIDkeithdmiller


Thanks the double quotes in upper case works

I had tried the view Idea earlier and this doesn't work
the real columm name is resolved at compile time


In article <971199935.27148.0.nnrp-07.9e984b29@news.demon.co.uk>,
  "Jonathan Lewis" <jonathan@jlcomp.demon.co.uk> wrote:
> Try quoting it in uppercase ...
>     set "VIEWS"  = 4
>
> If this doesn't work, could you create a
> view to hide the column from PL/SQL
>     create view xxx as
>     select
>         ....
>         views    new_views,
>         ...
>     from test_views
>     ;
>
> --
>
> Jonathan Lewis
> Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk
>
> keithdmiller@my-deja.com wrote in message <8rvejm$8v6
 $1@nnrp1.deja.com>...
> >I have inherited a table which has a column named "views"
> >an example is below
> >
> >create table test_views
> >(
> >   views number
> >)
> >;
> >insert into test_views values (1)
> >;
> >update test_views
> >set views = 3
> >;
> >
> >The above three statements result in a value of 3 in this field
> >
> >
> >if I execute these statements within a pl/sql block
> >
> >begin
> >insert into test_views values (1) ;
> >update test_views
> >set views = 3;
> >end;
> >
> >
> >I get the following error:
> >ORA-06550: line 6, column 5:
> >PLS-00103: Encountered the symbol "VIEWS" when expecting one of the
> >following:
> >
> >   ( <an identifier> <a double-quoted delimited-identifier>
> >The symbol "<an identifier> was inserted before "VIEWS" to continue.
> >
> >Currently a c++ program thru ADO is updating this field but I need to
> >do it in an PL/SQL procedure.
> >
> >Is there any way to positionally bind this column or escape the
> >reserved word?
> >
> >
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.

