Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Converting a numeric column into an alphanumeric column

Re: Converting a numeric column into an alphanumeric column

From: Stephan Hartmann <Stephan_Hartmann_at_t-online.de>
Date: Thu, 16 Dec 1999 00:28:21 +0100
Message-ID: <83985h$805$1@news04.btx.dtag.de>


Are you shure, that this doesn't work. I sometimes changed the definition of a field,
and I thought it still works when the column is set to null before. So you can copy the contents in a temp table or temp field, set it to null, change the definition, convert the type and copy back

If it's not working, it's the same thing as when you try to rename a column :

you have to copy the table to a temp table, disable all constraints to the table, drop the original table, create the new table, copy & convert the data, enable the constraints, build up again the indexes, constraints, triggers etc, drop the temptable

Greetings

Stephan

Jorge Rodríguez <jrodriguezed_at_nexo.es> schrieb in im Newsbeitrag: 8393hj$bgs$1_at_talia.mad.ttd.net...
> Hi,
>
> I've got the next problem. I want to convert a table column from NUMBER to
> VARCHAR2. Oracle does not permit it as it only lets you to change the
lenght
> of a column, and only to a higher lenght. I know that the solution is to
> drop the table and to create with the new column type, but the problem is
> that I need to preserve the data inside the table. Any ideas??
>
> Thank you in advance.
>
> Bye.
>
>
Received on Wed Dec 15 1999 - 17:28:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US