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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: datatypes

RE: datatypes

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Thu, 02 May 2002 06:08:23 -0800
Message-ID: <F001.004561E2.20020502060823@fatcity.com>


Imran,

what I do is the following:

create table temp_table as select primary_key_column, number_column from table_to_be_changed;

update table_to_be_changed
set number_column=null;

alter table_to_be_changed modify(number_column(3,2));

declare
 cursor c1 is
  select primary_key_column, number_column     from temp_table;
begin  

for c1_rec in c1 loop
  update table_to_be_changed

     set numebr_column = c1_rec.number_column
        where primary_key_column = c1_rec.primary_key_column;
end loop;

commit;

end;
/

Hope this helps.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----

Sent: Thursday, May 02, 2002 9:39 AM
To: Multiple recipients of list ORACLE-L

Perhaps:
Export, truncate table, alter table, import or
Create <temp_table> as select * from <orig_table>, truncate table <orig_table>,
alter table<orig_table>,
insert from <temp_table>,
drop <temp_table>

Imran Ashraf <imran9a_at_yahoo.com>@fatcity.com on 02-05-2002 14:18:28

Please respond to ORACLE-L_at_fatcity.com

Sent by: root_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc:

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: imran9a_at_yahoo.com
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: ListGuru_at_fatcity.com (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: rchalton_at_dunnes-stores.ie

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: ListGuru_at_fatcity.com (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: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
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: ListGuru_at_fatcity.com (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). Received on Thu May 02 2002 - 09:08:23 CDT

Original text of this message

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