DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: unable to insert

  1. #1
    Join Date
    Nov 2001
    Location
    denver
    Posts
    11

    Question

    I am trying to insert 22 records into a table from the migrated_rows table to fix a chaining problem. Each time I try to re-insert the records back into the table, I get the ORA-00947 error stating not enough values.

    I have tried variations of the following queries:

    insert into louise.produits select * from migrated_rows

    insert into louise.produits
    values
    (select * from migrated_rows)

    Any suggestions?

  2. #2
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    18
    Do a describe on both of the tables to ensure that they have EXACTLY the same structure. If they do not then you cannot use that method to insert into PRODUIT.

    If the columns in the table are in different order or there are a different number of columns in each table then you have to explicitly select them.

    i.e. PRODUITS ( col_a number(5), col_b varchar2(30) )
        MIGRATED_ROWS( col_b varchar2(30), col_a number(5), col_c DATE )
    In this case you must do the following:
         insert into PRODUITS( col_a, col_b )
         select col_a, col_b from MIGRATED_ROWS;

    I hope that this helps...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width