Hi,

One way is to do the following:

1. Export the table for backup purposes
2. Create a temp table containing the primary key and column to be altered.
3. update original_table set number_column=null;
4. alter original_table <table_name> MODIFY (column(3,2));
5. Update column from temp table.  (Assuming all the data in temp table
will go in number(3,2) format.


Rick


                                                                                       
                            
                    Imran Ashraf                                                       
                            
                    <imran9a@yaho        To:     Multiple recipients of list ORACLE-L 
<[EMAIL PROTECTED]>       
                    o.com>               cc:                                           
                            
                    Sent by:             Subject:     datatypes                        
                            
                    root@fatcity.                                                      
                            
                    com                                                                
                            
                                                                                       
                            
                                                                                       
                            
                    05/02/2002                                                         
                            
                    09:18 AM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    ORACLE-L                                                           
                            
                                                                                       
                            
                                                                                       
                            




Hi,

i have a column set to number(3). However this needs
to be changed to number (3,2). But i cannot do a
straight alter table as there is data in the column.

how can i get round this?

cheers

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Imran Ashraf
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to