Solved

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

Posted on 2011-02-27
7
757 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pl/sql - query very slow 26 88
any step by steps guide on how to install Oracle 12c on Windows 10 8 111
why truncate is faster than delete in oracle ? 4 50
oracle query 3 26
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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

733 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