Cant get rid of ORA-14155 after all googling (2 threads merged by bb) [message #661183] |
Fri, 10 March 2017 05:44 |
|
billgates
Messages: 19 Registered: March 2017
|
Junior Member |
|
|
I know there has been a big debate on this BUT nothing has worked for me so far.
SQL> DESC IMS_GRNM;
Name Type
GRNNO VARCHAR2(10)
BILL VARCHAR2(7)
SQL> ALTER TABLE IMS_GRNM RENAME COLUMN BILL TO INVOICE;
ORA-14155: missing PARTITION or SUBPARTITION keyword
SQL> SELECT TABLE_NAME, PARTITION_NAME FROM USER_TAB_PARTITIONS WHERE TABLE_NAME='IMS_GRNM';
TABLE_NAME PARTITION_NAME
----------- ---------------
SQL> SHO PARAMETER COMPATIBLE
NAME TYPE VALUE
---------- ------ -----
compatible string 9.0.0
Can somebody please tell me in simple words how to get rid of it.
|
|
|
Re: Cant get rid of ORA-14155 after all googling (2 threads merged by bb) [message #661186 is a reply to message #661183] |
Fri, 10 March 2017 06:00 |
John Watson
Messages: 8951 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I am not aware of any debate. You just need to use the correct syntax and it works:orclz>
orclz> desc dept;
Name Null? Type
----------------------------------------------------------- -------- ----------------------------------------
DEPTNO NOT NULL NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13)
orclz> alter table dept rename column loc to location;
Table altered.
orclz> desc dept;
Name Null? Type
----------------------------------------------------------- -------- ----------------------------------------
DEPTNO NOT NULL NUMBER(2)
DNAME VARCHAR2(14)
LOCATION VARCHAR2(13)
orclz>
[Updated on: Fri, 10 March 2017 06:01] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Cant get rid of ORA-14155 after all googling (2 threads merged by bb) [message #661193 is a reply to message #661191] |
Fri, 10 March 2017 06:11 |
|
Barbara Boehmer
Messages: 9097 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
In older versions, as a workaround, you can add the new column, update the new column with the data from the old column, then drop the old column, as shown below.
SCOTT@orcl_12.1.0.2.0> CREATE TABLE ims_grnm
2 (grnno VARCHAR2(10),
3 bill VARCHAR2(7))
4 /
Table created.
SCOTT@orcl_12.1.0.2.0> DESC ims_grnm
Name Null? Type
----------------------------------------- -------- ----------------------------
GRNNO VARCHAR2(10)
BILL VARCHAR2(7)
SCOTT@orcl_12.1.0.2.0> INSERT INTO ims_grnm (grnno, bill) VALUES ('grnno1', 'bill1')
2 /
1 row created.
SCOTT@orcl_12.1.0.2.0> COMMIT
2 /
Commit complete.
SCOTT@orcl_12.1.0.2.0> SELECT * FROM ims_grnm
2 /
GRNNO BILL
---------- -------
grnno1 bill1
1 row selected.
SCOTT@orcl_12.1.0.2.0> ALTER TABLE ims_grnm ADD (invoice VARCHAR2(7))
2 /
Table altered.
SCOTT@orcl_12.1.0.2.0> UPDATE ims_grnm SET invoice = bill
2 /
1 row updated.
SCOTT@orcl_12.1.0.2.0> ALTER TABLE ims_grnm DROP COLUMN bill
2 /
Table altered.
SCOTT@orcl_12.1.0.2.0> DESC ims_grnm
Name Null? Type
----------------------------------------- -------- ----------------------------
GRNNO VARCHAR2(10)
INVOICE VARCHAR2(7)
SCOTT@orcl_12.1.0.2.0> SELECT * FROM ims_grnm
2 /
GRNNO INVOICE
---------- -------
grnno1 bill1
1 row selected.
|
|
|
|
|
Re: Cant get rid of ORA-14155 after all googling (2 threads merged by bb) [message #661212 is a reply to message #661195] |
Fri, 10 March 2017 10:48 |
|
Michel Cadot
Messages: 68693 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
EdStevens wrote on Fri, 10 March 2017 13:21billgates wrote on Fri, 10 March 2017 06:09Is this the only solution to move onto 10g at least from 9i?
I'd think you'd want to move to a version that is supported . . . or at least was supported at some time in this millenium.
...
Worse, he is running the worst version Oracle has ever released.
Column renaming was introduced in 9.2.
|
|
|