Solved

How to locate/fix the insert error(ORA-932)?

Posted on 2011-02-27
7
747 Views
Last Modified: 2012-05-11
Have two tables T1, and T2 with same 50+ columns. T2 is located but T1 isn't.
Want to load the data into T1 from T2, so
insert into T1 select * from T2;
Unfortunately I got the error:
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got DATE

When I check the two tables and seems same:

SQL> select COLUMN_NAME, DATA_TYPE,DATA_LENGTH from dba_tab_columns where OWNER='schema1' and table_name = 'T1' minus
  2  select COLUMN_NAME, DATA_TYPE,DATA_LENGTH from dba_tab_columns where OWNER='schema1' and table_name = 'T2';

no rows selected

How to check/fix the error???
0
Comment
Question by:jl66
  • 4
  • 3
7 Comments
 

Author Comment

by:jl66
ID: 34992454
Columns contain date, varchar2, number, char, etc. I checked it. It seems the exactly same.
0
 

Author Comment

by:jl66
ID: 34992460
Have two tables T1, and T2 with same 50+ columns. T2 is located but T1 isn't.
=> Have two tables T1, and T2 with same 50+ columns. T2 is loaded but T1 isn't.
Sorry for that.
0
 
LVL 18

Accepted Solution

by:
sventhan earned 500 total points
ID: 34992461
How about this...

select COLUMN_NAME, DATA_TYPE,DATA_LENGTH from dba_tab_columns where OWNER='schema1' and table_name = 'T2
minus
select COLUMN_NAME, DATA_TYPE,DATA_LENGTH from dba_tab_columns where OWNER='schema1' and table_name = 'T1'

How many date's do you have?

Check the Date columns on both  the tables.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 18

Assisted Solution

by:sventhan
sventhan earned 500 total points
ID: 34992470
or,

Create table t1 as select * from t2
0
 

Author Comment

by:jl66
ID: 34992618
For your 1st response it is the same. No rows selected...
T1 has several constraints and T2 hasn't and use the different tablespaces. They are the defferences. This is also why I want  to keep the structure of T1.
0
 
LVL 18

Expert Comment

by:sventhan
ID: 34992666
< T1 has several constraints and T2 hasn't

It could be related to data issue. The tablespace does not cause any issues here. Apply the same constrains over T2 and see if you getting the same error.

0
 

Author Closing Comment

by:jl66
ID: 34993753
Thanks a lot. The issue was resolved by listing every column.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now