Modify not null number column to varchar2
                                                 Last update (2008-04-02 12:47:41)
                                                                                                                   Date added (2008-02-12 17:34:08)

Summary
You have a table, for example with name XXOTE.TT1 that has a column with name LLU_LL_NUMBER (number) which is not empty and want to convert it to varchar2 data type.
ALTER TABLE XXOTE.TT1 MODIFY(LLU_LL_NUMBER VARCHAR2(10));
Will not work, because the column is not empty!

You must do a trick. Just create a new column, letĘs say (TEST VARCHAR2(10)) and try to switch values between the 2 columns.
ALTER TABLE XXOTE.TT1 ADD (TEST VARCHAR2(10));
COMMIT;
UPDATE xxote.TT1 SET TEST = LLU_LL_NUMBER;
COMMIT;
UPDATE xxote.TT1 SET LLU_LL_NUMBER = NULL;
COMMIT;
ALTER TABLE XXOTE.TT1 MODIFY(LLU_LL_NUMBER VARCHAR2(10));
UPDATE xxote.TT1 SET LLU_LL_NUMBER = TEST;
COMMIT;
ALTER TABLE XXOTE.TT1 DROP (TEST);
Compile for invalid objects

Other links
Compile invalid objects (UTL_RECOMP)
Compile invalid objects per user connected
Reviews
Filters
Search