RE: odd problem when changing a datatype on table

  • From: "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 24 Aug 2004 10:27:11 -0400

Chris,

In the first crate table/select statement, you explicitely selected the
columns you wanted from the order_log table (col1, col2, to_number(col3)).

In the insert/select statement, you are doing a select *.  You now need to
do a column by column comparison between the two tables.  You will find a
column mis-match - maybe a number column trying to be inserted into a date
column?

Hope this helps.

Tom Mercadante
Oracle Certified Professional


-----Original Message-----
From: Chris Stephens [mailto:ChrisStephens@xxxxxxxxxx] 
Sent: Tuesday, August 24, 2004 10:21 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: odd problem when changing a datatype on table


Here's what i did:
 

create table order_log2 as select cola, colb, to_number(colc) colc,... from
order_log;

 

truncate table order_log

 

alter table order_log modify (colc number);

 

insert into order_log select * from order_log2;

 

......and i get:

 

ERROR at line 1:

ORA-00932: inconsistent datatypes: expected NUMBER got DATE

 

what gives?

 

it's not even on the column who's datatype i changed.

 

 


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx put
'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: