Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A column named "NUMBER"
D. Alvarado wrote:
> Hi, I'm running Oracle 8.1.7 for Solaris. I'm not sure how this
> condition came about in my environment, but a table was created and it
> contains a column named "NUMBER". That is not the data type, that is
> the actual column name (The data type is VARCHAR2(4)).
>
> So, when I try to update this column, like so
>
> UPDATE SCHOOLS SET NUMBER = '1234' WHERE PID = '00000024'
>
> I get the error
>
> ERROR at line 1:
> ORA-01747: invalid user.table.column, table.column, or column
> specification
>
> What can I do to properly update this column? IOf course, I will make
> every effort to track down the person that created this table and
> harass them.
>
> Thanks, - Dave
Very bad coding , but you can do this:
SCOTT at gh1 >create table test (number varchar2(4)); create table test (number varchar2(4))
*
SCOTT at gh1 >create table test ("number" varchar2(4));
Table created.
SCOTT at gh1 >desc test
Name Null? Type ----------------------------------------- -------- ---------------------------- number VARCHAR2(4)
SCOTT at gh1 >update test set number = 123; update test set number = 123
*
SCOTT at gh1 >update test set "number" = 123;
0 rows updated.
SCOTT at gh1 >
Look at the " around the column number.
hth
Günter
Received on Mon Oct 11 2004 - 13:09:11 CDT
![]() |
![]() |