Solved

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

Posted on 2011-02-27
7
755 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to recover a database from a user managed backup

840 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