Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8123893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:18:19+00:00 2026-06-06T06:18:19+00:00

I have to admin there is slight difference between the columns from both tables.

  • 0

I have to admin there is slight difference between the columns from both tables. But I thought that was minor.

The table Source has three attributes

Amount     NUMBER(10,2)
SHORTNAME  VARCHAR2(3)
NAME       VARCHAR2(40)

The table Target has the same set of attributes but slightly different constraints on their type

Amount     NUMBER
SHORTNAME  VARCHAR2(255)
NAME       VARCHAR2(255)

I thought table Target should have more tolerance on its capacity, but when I run the query

insert into DB_B.Target select * from DB_A.Source ;

Unfortunately I get the popular 01722 error:

SQL Error: ORA-01722: invalid number — 01722. 00000 – "invalid number"

So when we say when copying data from two tables with the same schema, are we talking about 100% IDENTICAL even on the TYPE CONSTRAINT?

Please help.

Update

Before thunder storm hit the office, I have to mention that the column order on both tables are different. Thanks to @a_horse_with_no_name help me think out this issue and give the perfect answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:18:20+00:00Added an answer on June 6, 2026 at 6:18 am

    Maybe the order of the columns is not identical in the two tables.

    Try to explicitely list the columns to make sure they aren’t mixed up for some reason:

    insert into db_b.target 
        (amount, shortname, name) 
    select amount, shortname, name 
    from db_a.source;
    

    Note that it’s generally considered bad style to not list the columns in the insert clause and to use select * in that way (even if that isn’t the cause of your problem)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom module I made for Magento. From the admin, there is
I have folder home/admin. In this folder there is index.php. When i access to
I have an application where there are two types of user currently, Admin and
I have these roles:Admin, Doctor and Patient. But login information is stored in different
I don't have admin rights to my pc, but would like to use Mercurial
I have a slight problem, I have a date format coming from php my
I have a web admin where there is a wysiwyg editor when a user
In my database I have a simple table that contains values showing the basic
I have an admin module, that has a file input filed, where I'd like
Okay, my dilemma is this. I have an admin page that I use to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.