RE: changing a column type

  • From: "Lange, Kevin G" <kevin.lange@xxxxxxxxxx>
  • To: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 1 Jun 2012 15:21:33 -0500

I guess the biggest reason not to allow numeric to character would be field 
size. 

-----Original Message-----
From: Lange, Kevin G 
Sent: Friday, June 01, 2012 3:20 PM
To: 'oratune@xxxxxxxxx'; oracle-l
Subject: RE: changing a column type

And to me, that's the strange thing.

I can see allowing Character to varchar2.
I can also see not allowing Character to Numeric.

But why not allowing Numeric to Character ?   

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of David Fitzjarrell
Sent: Friday, June 01, 2012 3:16 PM
To: Brian.Zelli@xxxxxxxxxxxxxxx; oracle-l
Subject: Re: changing a column type

That depends upon the change; a change from char to varchar2 is allowed with 
the column populated but a change from a numeric to a character type is not.

David Fitzjarrell



________________________________
From: "Zelli, Brian" <Brian.Zelli@xxxxxxxxxxxxxxx>
To: oracle-l <oracle-l@xxxxxxxxxxxxx>
Sent: Friday, June 1, 2012 12:48 PM
Subject: RE: changing a column type

I thought you would not be able to change it with data in it but he told me he 
has in the past.  I wasn't so sure......

ciao,
Brian

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Powell, Mark
Sent: Friday, June 01, 2012 2:43 PM
To: oracle-l
Subject: RE: changing a column type

Observe:

MPOWEL01@UT1> create table marktest2 ( fld1 number, fld2 varchar2(30));

Table created.

MPOWEL01@UT1> insert into marktest2 values (1,'something or other');

1 row created.

MPOWEL01@UT1> commit;

Commit complete.

MPOWEL01@UT1> alter table marktest2 modify (fld1 varchar2(10)); alter table 
marktest2 modify (fld1 varchar2(10))
                              *
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype


MPOWEL01@UT1>

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Zelli, Brian
Sent: Friday, June 01, 2012 1:51 PM
To: oracle-l
Subject: changing a column type

A colleague wants to change a column type from numeric to alpha-numeric.  Can 
he change it with data in it?

ciao,
Brian



This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.-- 
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

--
http://www.freelists.org/webpage/oracle-l


Other related posts: