gdlp2004
asked on
Unable to Modify Column / Query
I use a program that made an SQL script that created several tables with the field 999Id, but everytime I try to run a query using this name it thinks 999Id is a number. I've tried everything and it breaks all my SQL statements. Is there anyway I can force Oracle9i to rename this field without breaking it. I've tried all these statements none of which worked.
alter table een rename column "999id" to nine99id
*
ERROR at line 1:
ORA-00904: "999id": invalid identifier
alter table een rename column 999id to nine99id
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column '999id' to nine99id
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column '999id' to 'nine99id'
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column "999id" to "nine99id"
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column 999id to nine99id
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column "999id" to nine99id
*
ERROR at line 1:
ORA-00904: "999id": invalid identifier
alter table een rename column 999id to nine99id
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column '999id' to nine99id
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column '999id' to 'nine99id'
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column "999id" to "nine99id"
*
ERROR at line 1:
ORA-00904: : invalid identifier
alter table een rename column 999id to nine99id
*
ERROR at line 1:
ORA-00904: : invalid identifier
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi
i think there might be some invisible characters along with the field name. that could be the reason why it is not allowing to rename the field name.
regards
annamalai
i think there might be some invisible characters along with the field name. that could be the reason why it is not allowing to rename the field name.
regards
annamalai
ASKER
Thanks!!! Previously, when I had to rename columns, the SQL did not seem case sensitive, but in this case it was "999ID" not 999id or "999id".
SQL> create table tst1 ("999id" number);
Table created.
Elapsed: 00:00:00.06
SQL> desc tst1
Name Null? Type
--------------------------
999id NUMBER
SQL> alter table tst1 rename column "999id" to nine99id;
Table altered.
Elapsed: 00:00:00.56